Week -2
AIM :
1. To make a simulink model of door bell using solenoid block.
2. To make a simulink model using a thermistor to sense the temperature of a heater and turn on or turn off the fan.
SOLENOID :
A solenoid a type of electromagnet, the purpose of which is to generate a controlled magnetic field through a coil Boond 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 Andre marie ampere designate a helical coil. In engineering the term may also refer to a variety of transducer devices that convert energy into linear motion. Term is also often used to refer to a solenoid valve, an integrated device containing and electro mechanical celluloid which actually it's either a pneumatic for hydraulic Valve. Which is a special specific type of Relay that internally uses an electrochemical solenoid to operate an electrical switch for example an auto mobile starter solenoid or linear solenoid. Solenoid bolts, a type of electro a mechanical locking mechanism also exist. In electromagnetic technology solenoid is an acctuater assembly with a sliding ferromagnetic plunger inside the coil. Without power the plunger extends for part of its length outside the coil, applying powerful is the plunger into the coil. Magnets which fixed cores or not considered solenoids.
THERMISTOR :
A thermistor is a type of resistor who is resistance is dependent on temperature more so than in standard resistors. The word is a combination of thermal and resistor. Thermistors a widely used as in rush current limiters, temperature sensors ,self resetting overcurrent protectors and self regulating heating elements.
Thermistors are of two opposite fundamental types :
1. With NTC thermistors distance decreases as temperature rises. An NTC commonly used as a temperature sensor or in series with a circuit as an Inrush current Limiter.
2. With PTC thermistors, resistance increases as temperature. PTC thermistors a commonly installed in series with a circuit and used to protect against over current conditions.
Thermistors are generally produced using powder Metal oxides which vastly improved formulas and techniques over the past 20 years, NTC thermistors can now achieve accuracies over right temperature ranges such as +-0.1 degree C or +-0.2 degree C from 0 dgree C to 70 degree C with excellent long-term stability. NTC thermistors Element come in many styles such as axial-leaded glass encapsulated, glass coated chips, epoxy coated with bare of insulated lead wire and surface mount as well as Road and discs, the typical operating temperature range of a thermistor is -55degree C to +150 degree C, though some glass body thermistors have a maximum operating temperature of +300degree C.
Thermistors differ from resistance temperature detectors in that the material used in a thermistor is generally a ceramic or polymer while resistance temperature detector is used pure metals. Temperature response is also different RTSs are useful over Jai temperature ranges welfare measures typically achieve a great precisoin within a limited temperature range typically -90degree C to 130 degree 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 plunger
FOR THERMISTOR

Basic Components used to generate a simple cooling fan circuit are;
1.Battery
2. Thermistor
3. Fan
4. Resistor
5. Transistor
Objectives
For doorbell:
1. Create a situation where is the switch is closed for two seconds and then release. Observe the physical movement of the plunger.
For Fan :
1. Temperature source should be 20 degree C ftom 0 to 10 seconds, 27 degreee C from 10 to 30 seconds, 23 degree C from 30 to 50 deconds. When conditions should be on is the temperature above 25 degree C, otherwise OFF
SIMULINK MODEl. :

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 similar model we have to take blocks that perform same action what 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.
And then this solenoidblock and battery block are connected to each other with a positive and negative terminals.
A which block is placed between solenoid block and battery block and it's connected with both the blocks.
Now for the switch to operate no need to provide a physical signal through PS port in switch block. No provided physical signal should be greater than the creation of the switch for switch Bing close or else it will open.
Now this phone battery switch and solenoid that is connected to an electrical reference block which represents earhting of the circuit . This electrical reference Block should be connected with negative port of the battery Block
Then in solenoid Block, R and C call to variables which represent plunger and fixed point respectively.
Now this R is connected to a R of ideal translational motion sensor block which senses the position of the plunger in the solenoid Block and gives the output. Now in ideal translation motion sensor block the outputs are given as V & P which represents the velocity and position of the plunger since we are only interested in knowing the change in position of plunger so we need only results from P output. Now C in the ideal translation motion sensor blog is a mechanical translation conserving port which means that the mechanical process starts from R and ends atC.. so C in the ideal translation motion sensor Block is connected to a mechanical translation reference which represents to a fixed point where it is rigidly clamped in real time. Similarly C solenoid Block is also connected to the same mechanical translation reference as fixed point for the. Since we want position of pleasure as output from ideal translation motion sensor blog we have connected port P tpo PS simulink what are where is the physical values from PortP I converted into similar value and then this PS simuliunk converter is connected to school Block which will generate a graph for change in position of London and P of ideal translation motion sensor Block. Now to provide a physical signal for operating this which we have use a pulse generator block which generates a continous squafe pulse.

From the above figure we can observe that we have taken that we have given period value as 4, Pulse width as 50 phase delay as 2 and amplitude is 1 we have not changed it. This means that initially the pulse will be zero since we have given phase delay of 2 so till 2 sec the pulse will be zero and at 2 seconds the pulse will start from 0 to 1 since we have given amplitude as one and then now the pulse will half of period so for the next two seconds the pulse will be at amplitude 1 only. Then it will again come down to 0 at 4th Second and then it will add zero for next two seconds thus completing the period of four seconds.
I'm starting to ending of the pulse it will take 4 seconds of time period in which only for 2 seconds of time period in which only for two seconds the amplitude will be one and for the rest of time it will be zero. So after this four seconds period again the polls will be generated and 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 simulation model and double clicking on the scope 1 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 the above point the pulse has started after two seconds then for next two seconds it has an amplitude of 1, and the next two seconds the pulses again 0. The pulse starting from two seconds and ending at six seconds which is nothing but a time period of two seconds. Does this represents that when amplitude is1, the switch will be closed and when it is zero switch will open. Since our objective is only to see the change in position of plunger events which is close for two seconds so the we have the amplitude as 1 for 2 seconds 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 a simulink PS converter lock Since switch only takes physical value as input. as mentioned above the portP of ideal translation motion sensor lock 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 internal to give the results of the whole simulation models as output. Now when we run the model and double click on the scope block which is connected to the ideal translation motion sensor block we get the following results

After double clicking on the scope block which is connected to the ideal translation motion we get the following output here X axis represents the time and Y axis represents position of plunger(mm). From the above figure we can also observed that the initial position of the pleasure is at 5, as from the pulse generator block a pulse generated at 2, so in the position of the plunger is also changing a time 2 sec and time till which the pulse amplitude is one till that time the pleasure is also at same position after the change from initial position. Again as the amplitude of pulse becomes zero the planter returns to its initial position back again and as the pearl cycle goes on lunch are also changes its position and comes back to its initial position. We can also observed that when there is a change in position of plunger there are some waves form at the start of change in position. This is due to recording of the spring each time when the pleasure 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
Here we got a smoother graph from the previous one this is because we changed the values of spring constant and damping coefficient in solenoid block.
FOR FAN OPERATION USING THERMISTOR : 
Explanation :
To create a simple cooling fan using thermistor we need a thermistor battery resistor voltmeter logical switch which a basic components of the circuit we need in similunk model. 1st to represent a thermistor a thermistor block is taken and placed in the model now to represent a battery battery Block is taken and the positive code of this blog is connected to the positive quote of thethermistor Block. Now to represent a resistor, a resistor Block is taken from the library browser and its positive put is connected to the negative put of thethermistor block. The negative port of resistor block is connected to the negative part of the battery Block. Now electrical reference block is connected near the negative terminal of the battery block which represents the earthing of the real-time circuit. Now to represent a voltmeter of voltage sensor Block is connected parallel to the resistor Block, because to measure the voltage across the component voltmeter should be always connected parallel to that component. Now we have completed a simple circuit model but we will be needing some physical quantities to as signal for thermistor to work. In this case we need the pain to get on and off at different temperatures so to provide temperature we have used control temperature source block. Which only gives a specified temperature as output even though heat flow is More. Now give different temperature to this control temperature source block now we need to send temperature signals to send the signals we have used a signal builder block which allows us to send any type of signals as input. We have to double click on the signal builder block to set the signal according to our requirement 
Above figure shows how the signal or sit in the signal builder clock as this dialogue box opens first we have to click on the signal at the top and then select new then select custom option now we will have to put the values of X and Y axis. Since we know that at which time we need the temperatures as mentioned in the question 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 that how different temperatures are given a different time so we have created a signals and before connecting it two the control temperature soars block me how to convert the signals into physical value so in order to do this we have a simulink PS converter Block . So now the port B of control temperature source Block is connected to the port A of the thermistor block and put A of control temperature source block is connected to a thermal reference Block. In control temperature block a positive temperature difference causes the temperature at port B to be greater than the temperature at port A.
Now the output of voltage sensor block is connected to the scope block and before connecting to the scope block to convert physical value to simulink values be used a PS simulink converter Block. Now when we run this simulation and double click on the scope block we will get the following graph

From the above graph we can see that how old is stingy with change in temperature using this information we can set conditions for fan to on and off.
If we observe the graph we notice that from time 0 to 10 seconds when temperature is 293 K voltage is between 0.0095 and 0.01 and from time 10 to 30 seconds when temperature is 300 Kelvin voltage is between 0.0125 and 0.013 and from 1030 to 50 seconds when temperature is 296 Kelvin voltage is nearly 0.011.
As mentioned in the objective then should be on when temperature is more than 25°C from the above graph when voltage is more than 0.011% the fan should be on and then voltage is below 0.0111 should be off.
This logic used to on and off the fan to do this we have used a switch Block routes the signal cording to the conditions provided. The Centre port of switch lock 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 one which we have specified in the top port of the switch block. If the voltage from voltage sensor block is less than the threshold value in the switch block then it will pass the value zero which you have specified in the bottom part of the switch block. To set the threshold value of switch clock we have to double click on this which block and then we can change the value of the threshold.. Since we want to switch to be on only when the temperature is 300 Kelvin so the threshold is given as 0.011 so when voltage gets more than 0.011 the switch will give value one as output which means when will be on and when will teach gets less than 0.011+ which will you value zero as output which means define will be of now the output of which block is connected to another school Block to get the following reasons.
Conclusion :
We have achieve our desired objective.
We can use similar approach for simulating other physical devices using simulink.