Challenge

Week -2

WEEK-2 CHALLENGE

AIM:
  • To make a Simulink Model of Door Bell using solenoid block.
  • To make a Simulink Model Use a thermistor to sense the temperature of a heater & turn on or turn off the fan.
SOLENOID:
A solenoid is a type of electromagnet, the purpose of which is to generate a controlled magnetic field through a coil wound into a tightly packed helix. The coil can be arranged to produce a uniform magnetic field in a volume of space when an electric current is passed through it. The term solenoid was coined in 1823 by André Marie Ampère to designate a helical coil. In engineering, the term may also refer to a variety of transducer devices that convert energy into linear motion. The term is also often used to refer to a solenoid valve, an integrated device containing an electromechanical solenoid that actuates either a pneumatic or hydraulic valve, or a solenoid switch, which is a specific type of relay that internally uses an electromechanical solenoid to operate an electrical switch, for example, an automobile starter solenoid or linear solenoid. Solenoid bolts, a type of electromechanical locking mechanism, also exist. In electromagnetic technology, a solenoid is an actuator assembly with a sliding ferromagnetic plunger inside the coll, Without power the plunger extends for part of its length outside the coil, applying power pulls the plunger into the coll Electromagnets with fixed cores are not considered solenoids.
THERMISTOR:
A thermistor is a type of resistor whose resistance is dependent on temperature, more so than in standard resistors. The word is a combination of thermal and resistor Thermistors are widely used as inrush current limiters, temperature sensors (negative temperature coefficient or NTC type typically), self-resetting overcurrent protectors, and self-regulating heating elements (positive temperature coefficient or PTC type typically).
Thermistors are of two opposite fundamental types
  • With NTC thermistors, resistance decreases as temperature rises, An NTC is commonly used as a temperature sensor or in series with a circuit as an inrush current limiter.
  • With PTC thermistors, resistance increases as temperature rises. PTC thermistors are commonly installed in series with a circuit and used to protect against overcurrent conditions, as resettable fuses
Thermistors are generally produced using powdered metal oxides. With vastly improved formulas and techniques over the past 20 years, NTC thermistors can now achieve accuracies over wide temperature ranges such as 10.1 °C or +0.2 °C from 0 to 70°C with excellent long-term stability. NTC thermistor elements come in many styles such as axial-leaded glass-encapsulated (DO-35, DO-34, and DO-41 diodes), glass-coated chips, and epoxy-coated with bare or insulated lead wire and surface-mount, as well as rods and discs. The typical operating temperature range of a thermistor is -55 °C to +150 °C, though some glass-body thermistors have a maximal operating temperature of +300 °C.
Thermistors differ from resistance temperature detectors (RTDs) in that the material used in a thermistor is generally a ceramic or polymer, while RTDs use pure metals. The temperature response is also different RTDs are useful over larger temperature ranges, while thermistors typically achieve a greater precision within a limited temperature range, typically-90 °C to 130 °C.
GOVERNING DIAGRAMS:
FOR SOLENOID:
Basic components used to generate a simple doorbell circuit are:
1. Battery
2. Switch
3. Solenoid
4. A bell with a plunger.
FOR THERMISTOR
Basic components used to generate a simple cooling fan circuit are:
1. Battery
2 Thermistor
3. Fan
4. Transistor
5. Resistor.
OBJECTIVES:
FOR DOORBELL:
  • Create a situation where the switch is closed for 2 seconds and then released. Observe the physical movement of the plunger.
FOR FAN:
  • The temperature source should be 20 °C from 0 to 10 seconds, 27 °C from 10 to 30 seconds, and 23 °C from 30 to 50 seconds. Fan conditions should be ON if the temperature is above 25 °C, OFF otherwise.
SIMULINK MODEL:
DOOR BELL:
EXPLANATION:
  • From the above governing circuit of a doorbell, we know that we need a switch, solenoid, battery, and a plunger.
  • So, in order to get all these components into a Simulink model, we have to take blocks that perform the same action that the above devices perform.
  • Now first a 'Solenoid Block' is taken to represent a solenoid in the model, then to represent the battery we have taken Battery Block from the library browser.
  • Then this 'Solenoid Block and 'Battery Block' are connected to each other via positive and negative terminals.
  • A 'Switch Block' is placed in between 'Solenoid Block and 'Battery Block and it is connected with both the blocks.
  • Now for the Switch to operate we need to provide a physical signal through the PS port in the Switch Block The provided physical signal should be greater than the threshold of the switch, for the switch to be closed, or else it will open.
  • Now, this whole battery, switch, and solenoid path is connected to an Electrical Reference Block which represents earthing of the circuit. This Electrical Reference Block should be connected with the negative port of the Battery Block.
  • Then in the Solenoid Block, 'R' and Care are two variables that represent plunger and fixed point respectively
  • Now this 'R' is connected to an R of Ideal Translation Motion Sensor Bock, which senses the position of the plunger in the 'Solenoid Block and gives the output.
  • Now in Ideal Translation Motion Sensor Bock, the outputs are given as V and P which represent the velocity and position of the plunger. Since we are only interested in knowing the change in position of the plunger, so we need only results from the P output
  • Now 'C' in the ideal Translation Motion Sensor Bock is a mechanical translation conserving port, which means that the mechanical process starts from Rand and ends at C, and again it starts at 'R' and the cycle goes on.
  • So 'C' in the ideal Translation Motion Sensor Bock" is connected to a 'Mechanical Translation Reference' which represents a fixed point where it is rigidly clamped in real-time.
  • Similarly, C of Solenoid Black is also connected to the same Mechanical Translation Reference as the fixed point for the solenoid.
  • Since we position the plunger as output from Ideal Translation Motion Sensor Bock' we have connected port P to a 'PS- Simulink Converter where the physical values from port P are converted into Simulink value, and then this 'PS-Simulink Converter' is connected to 'Scope Block' which will generate a graph for change in position of the plunger from port 'P' of 'Ideal Translation Motion Sensor Bock'.
  • Now to provide a physical signal for operating the switch, we have used a 'Pulse Generator Block', which generates a continuous square pulse.

  • From the above Figure we can observe that we have taken we have given the period value as '4', pulse width as '50', phase delay as '2', and amplitude by default is '1' we have not changed it. This means that initially, the will be zero since we have given a phase delay of '2' so till 2 sec the pulse will be zero and at 2 secs the pulse will pulse start from zero to I since we have given amplitude as 'l' and then now the pulse width will half of period, so for the next two seconds the pulse will be at amplitude 'l' only, then it will again come down to zero at 4th second and then it will at zero for next 2 secs thus completing the period of 4 seconds.
  • From starting to ending of the pulse it will take 4 secs of the time period in which only for 2 secs the amplitude will be one and for the rest of the time, it will be zero. So, after these 4 secs period again the pulse will be generated, and thus the cycle continues.
  • To this 'Pulse Generator 'Block' a 'Scope Block' is connected to see how the pulse is generated.
  • The above figure is obtained by running the Simulink model and double-clicking on the 'Scopel' block. This figure shows, how the pulse is generated, and in this figure, the X-axis represents the time and Y-axis represents the amplitude. As mentioned in point no.18, the pulse has started after 2 seconds, then for the next two seconds, it has an amplitude of '1', and then next two seconds the pulse is again zero. The pulse is starting at 2 seconds and ends at 6 seconds which is nothing but a time period of two seconds.
  • Thus, this represents that when the amplitude is one, the switch will be closed and when it is zero the switch will open. Since our objective is only to see the change in position of the plunger when the switch s closed for 2 sed, so then we have the amplitude as 1 for 2 secs in the pulse generator by making the pulse width half of the period in the inputs for 'Pulse Generator Block.
  • Since the pulse that is coming from 'Pulse Generator Block is a Simulink value, so to convert this value into a physical value we have used 'Simulink-PS Converter Block' since the switch only takes the physical value as inputs. 22. As mentioned above the port 'P' of 'Ideal Translation Motion Sensor Bock' is connected to another 'Scope Block', and a 'Solver Configuration Block' is also connected to this path which generates equations and solves the whole model internally to give the results of the whole Simulink model as output.
  • Now run the model and double click on the 'Scope' Block which is connected to the 'Ideal Translation Motion Sensor Bock' to get the results.
  • We will get the above graph as the result when we double click on the 'Scope' block. Here x-axis represents the time in seconds and the y-axis represents the position of the plunger in mm
  • From the above figure, we can observe that the initial position of the plunger is at '5', as from the pulse generator block, a pulse is generated at 2, so the position of the plunger is also changing at time 2 seconds and time till which the pulse amplitude is 'l' till that time the plunger is also at the same position after the change from the initial position.
  • Again, as the amplitude of the pulse becomes zero, the plunger returns to its initial position back again and as the pulse cycle goes on, the plunger also changes its position and comes back to its initial position.
  • We can also observe that when there is a change in position of the plunger, there are some waves that form at the start of changes in position. This is due to the recoil of the spring, each time when the plunger is moving. So to reduce this, in the 'Solenoid Block' we can reduce the spring constant value and increase the damping coefficient. This will reduce the waves that are being formed and we will get a smooth graph.
  • The above figure is a smoother graph than the previous one. This is done by changing the values of spring constant and damping in the 'Solenoid Block'.
FOR FAN OPERATIONS USING THERMISTOR:
EXPLANATION:
  • To create a Simple Cooling Fan model using a Thermistor we need a thermistor, battery, resistor, voltmeter, and a logical switch which are basic components of the circuit we need in the Simulink model.
  • First, to represent a thermistor, a Thermistor Block is taken and placed in the model. Now to represent a battery. a Battery Block is taken and the positive port of this block is connected to the positive port of the Thermistor Block
  • Now to represent a resistor Black is taken from the library browser and its positive port is connected to the negative port of the Thermistor Block. The negative port of the Resistor Block' is connected to the negative port of the Battery Block Now an Electrical Reference Black is connected near the negative terminal of the Battery Block which represents the earthing of the real-time circuit.
  • Now to represent a voltmeter a 'Voltage Sensor Block' is connected parallel to the 'Resistor Block because to measure the voltage across a component, the voltmeter should be always connected parallel to that component.
  • Thus, we have completed our simple circuit model, but we need some physical quantities as signals for the thermistor to work.
  • In this case, we need the fan to get ON and OFF at different temperatures. So, to provide temperature, we have used the 'Controlled Temperature Source Block' which only gives a specified temperature as output even though heat flow is more.
  • Now to give different temperatures to this 'Controlled Temperature Source Block' we need to send temperature signals. To send these signals we have used a 'Signal Builder Block' which allows us to send any type of signal as inputs.
  • We have to double click on the 'Signal Builder Block' to set the signal according to our requirement.
  • The above Figure shows how the signal is set in the 'Signal Builder Block'. As this dialogue box opens, first we have to click on the "Signal" at the top and then select "New" then select the "Custom" option. Now it will ask to give the values of the y-axis and x-axis. Since we know at which time, we need which temperature as mentioned in the starting, we can give those values in an array in this box, and then the above figure signals are generated.
  • We can see in the figure how different temperatures are given at different times. So thus, we have created our signals and before connecting them to the 'Controlled Temperature Source Block' we have to convert these signals into a physical value. So, to do this we have used a 'Simulink-PS Converter Block'.
  • So now the port 'B' of 'Controlled Temperature Source Block' is connected to port 'A' of the 'Thermistor Block' and port 'A' of 'Controlled Temperature Source Block' is connected to the 'Thermal Reference Block'. In 'Controlled Temperature Source Block' a positive temperature difference causes the temperature at port B to be greater than the temperature at port A.
  • Now the output of the 'Voltage Sensor Block' is connected to the 'Scope Block' first, and before connecting to the 'Scope Block' a 'PS-Simulink Converter' is used to convert the physical values to Simulink values.
  • Now when we run the simulation and double click on the 'Scope Block' we will get the following graph.
  • From the above figure, we can see how voltage is changing with a change in temperature. Using this information, we can set conditions for fans to ONN and OFF.
  • If we observe the graph, we notice that from time 0 to 10 seconds when the temperature is 293K, the voltage is between 0.0095 and 0.01, and from time 10 to 30 seconds when the temperature is 300K, the voltage is between 0.0125 and 0.013 and from time 30 to 50 seconds when the temperature is 296K, voltage is nearly 0.011.
  • As mentioned in the objective fan should be ONN when the temperature is more than 25 degrees Celsius, from the above graph when the voltage is more than 0.011 the fan should be ON when the voltage is below 0.011, so the fan should be OFF.
  • The above logic is used to ONN and OFF the fan. To do this we have used a 'Switch Block' that routes the signals according to the conditions provided.
  • The center port of 'Switch Block' is connected to the output of 'PS Simulink Converter' which gives the voltage values. The top part of the 'Switch Block' is connected to a 'Constant Block' of value I and the bottom part of the 'Switch Block' are connected to another Constant Block' of value 0.
  • The center port of 'Switch Block' is the condition input which means that when the value from Voltage Sensor Block' is more than the threshold value in the 'Switch Block then it will pass the value I which we have specified in the top part of the 'Switch Block. If the voltage from the 'Voltage Sensor Block' is less than the threshold value in the 'Switch Block' then it will pass the value 0 which we have specified in the bottom part of the 'Switch Block". Here it acts like a transistor in a real-time circuit.
  • To set the threshold value of 'Switch Block, we have to double click on the 'Switch Block' and then we can change the value of the threshold. Since we want the switch to be ONN only when the temperature is 300K so the threshold is given as 0.011. So when the voltage gets more than 0.011 the switch will give value I as output which means the fan will be ONN and when the voltage gets less than 0.011 the switch will give value 0 as output which means the fan will be off.
  • Now the output of 'Switch Block' is connected to another 'Scope Block to get the results.
  • By double-clicking the Scope Block we can observe the above graph. Here we can clearly see that when the temperature is 300K the fan is ONN and at remaining temperatures, the fan is OFF.
CONCLUSIONS:
  • Thus, both objectives were achieved successfully.
  • A similar approach can be used for simulating other physical devices using Simulink.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.