# ME 1402 – MECHATRONICS (UNIT – III

)

SYSTEM MODELS This chapter determines how the systems behave with time when subjected to some disturbance. E.g. A microprocessor switches on a motor. The speed will not attain immediately but it will take some time to attain full speed. In order to understand the behavior of the systems, mathematical models are needed. These models are equations which describe the relationship between the input and output of a system. The basis for any mathematical model is provided by the fundamental physical laws that govern the behavior of the system. In this chapter a range of systems will be considered including mechanical, electrical, thermal & fluid examples. Systems can be made up from a range of building blocks from a number of basic building blocks. MECHANICAL SYSTEM BUILDING BLOCKS The basic building blocks of the models used to represent mechanical systems are 1) Springs Springs Springs represents the stiffness of the system. The fig. shows a spring subjected to force F. 2) dashpots 3) masses

1

In case of spring the extension (or) compression is proportional to the applied forces.
F = K .x

F – Applied force

x – extension

k – a constant

The spring when stretched stores energy, the energy being released when the spring back to its original length. The energy stored,
E= 1 F2 K .x 2 = 2 2K

Dash Pots Dashpots building blocks represent the types of forces experienced when we push the object through a fluid or move an object against frictional forces.

In ideal case damping or resisting force F is proportional to the velocity of the piston. Thus F=Cv V – Velocity of piston
F =C dx dt

C – a constant

(Since velocity is the rate of change of displacement x.)

Masses
2

Masses represent the inertia or resistance to acceleration.

According to Newton’s II law F = ma
=m dv dt

= m

d 2x dt 2

There is also energy stored in mass, when it is moving with velocity V1. The energy being referred to as kinetic energy, and released when it stops moving.
E= 1 × mv 2 2

However there is no energy stored in the dashpot. It does not return to the original position, when there is no force input. The dashpot dissipates energy rather than spring. The power dissipated depending on the velocity V and being given by. P = C V2 ROTATIONAL SYSTEMS The spring, dashpot and mass are the basic building blocks for mechanical systems when forces and straight line displacements are involved without any rotation. If there is rotation then the equivalent three building blocks are a torsional spring, a rotary damper and the moment of inertia, i.e,

3

the inertia of a rotating mass. Hence With the rotary damper a disc is rotated in a fluid and the resistive toque T is proportional to the angular velocity ω. With a torsional spring the angle θ rotated is proportional to the toque T. i.e. i. dθ dt . and since angular velocity is the rate at which angle changes. The moment of inertia building block exhibits the property that the greater the moment of inertia I the greater the torque needed to produce an angular acceleration α. then 4 .e. dt and angular velocity is the rate of change of angular displacement. With such building blocks the inputs are torque and the outputs angle rotated. since angular acceleration is the rate of change of angular velocity. Thus. dω .

The energy stored by a torsional spring when twisted through an angle θ is ½ kθ2 and since T = k θ this can be written as The energy stored by a mass rotating with an angular velocity ω is the kinetic energy E. the rotary damper just dissipates energy.The torsional spring and the rotating mass store energy. where The power P dissipated by the rotary damper when rotating with an angular velocity ω is 5 .

The system is fixed at one end and the mass is supported by a spring and damper. The mass is excited by force and free to oscillate. The equation of motion related to horizontal motion x of mass to applied force can be developed with of a free body diagram Net force applied to mass m = F − k .x − B.BUILDING UP A MECHANICAL SYSTEM TRANSLATIONAL MECHANICAL SYSTEM Spring mass damper system: A spring mass damper system is shown in fig.v 6 .

ILLUSTRATIONS MATHEMATICAL MODEL FOR A MACHINE MOUNTED ON THE GROUND MATHEMATICAL MODEL OF A WHEEL OF A CAR MOVING ALONG A ROAD 7 .= F − kx − B dx dt ------- (1) Also net force applied to mass = mass x acceleration = m (2) Equation (1) = (2) Apply Newton’s II law of motion m dx d 2x = F − kx − B 2 dt dt d 2x dt 2 ----- F =m d 2x dx + kx + B 2 dt dt This equation is called as the differential equation that describes the relation between input and output.

PROBLEMS 8 .

9 .

Resistors: Resistance is an opposition to movement of flow of material or energy. Capacitors Capacitors are used to stored charge to increase the voltage by iV. When current flows through the wire. A capacitor consists of two parallel plates separated by insulating material and capacitor act as a strong device of energy. The inductor equation is V =L di dt 10 . An electric resistor opposes the flow of current. Any attempt to change the density of this magnetic field leads to the induction of voltage. The voltage equation for a capacitor is V = 1 ∫ idt C Where c = capacitor.ELECTRICAL SYSTEM BUILDING BLOCKS The basic building blocks of electrical building blocks are inductors. a magnetic field surrounding the wire is produced. and resisters. Inductors: It consists of a coil wire. capacitors. Where R= resistance. the voltage V across the resistor is given by V= I R.

BUILDING UP A MODEL FOR ELECTRICAL SYSTEM NODE ANALYSIS 11 . 2. The current law states that the sum of the current flowing into a junction equals to the sum of the current flowing out of a junction. 1. The voltage law state that the sum of the voltage input equal the sum of the voltage drop in any closed loop.Kirchhoff’s law: Electrical networks can be analyzed using Kirchhoff’s current and voltage laws.

MESH ANALYSIS 12 .

RESISTOR CAPACITOR SYSTEM (RC SYSTEM) 13 .

RESISTOR INDUCTOR SYSTEM (RL SYSTEM) 14 .

RESISTOR INDUCTOR CAPACITOR SYSTEM (RLC SYSTEM) 15 .

ANOTHER ILLUSTRATION FOR RLC SYSTEM 16 .

q 1 Where R = hydraulic resistance.FLUID SYSTEM BUILDING BLOCKS The three basic building blocks of a fluid flow system can be considered to be equivalent of electrical resistance. Pneumatic In hydraulic the fluid is a liquid and considered to be incompressible. Hydraulic. Hydraulic resistance(R) It is the resistance to flow which occurs as a result of a liquid flowing through valves or changes in pipe diameter. The relationship between the volume flow rate and resistance element and the resulting pressure difference P − P2 = R. inductance and capacitance. In pneumatic gas is used and which can be compressed. Fluid systems can be considered to fall in to two categories. 17 . 1. 2. HYDRAULIC SYSTEMS 1.

Then container.q2 = rate of liquid flow. h = height of liquid. ρg 18 . P = pressure difference . q1 − q 2 = dv dt where d v dt = rate of change of volume V in q1 − q2 = P = ρgH P H = ρg d ( AH dt ) =A dH dt  P  d  ρg    ∴q1 − q2 = A  dt A dP = ρg dt dP =C dt A whereC = . q1. hydraulicc apaci tan ce . Hydraulic capacitance This term is used to describe energy storage with a liquid when it is stored in the form of potential energy.2.

a =m dv dt dv dt = ρAL Volume flow rate q= A. therefore ( P1 − P2 ) A = m.3. 19 .v ∴( P1 − P2 ) A = Lρ P1 − P2 = dQ1 dt Lρ dQ1 A dt dQ1 dt =I Where I= hydraulic inertance. Hydraulic inertance It is equivalent of inductance in electrical systems or a spring in mechanical systems. To accelerate a fluid and so increase its velocity a force is required. F1 − F2 = P A − P2 1 = ( P1 − P2 ) A This net force cause the mass to accelerate with an acceleration a. Consider a block of liquid of mass m. The net force acting on the liquid.

PNEUMATIC SYSTEM 20 .

21 .

22 .

Building up a model for fluid system 23 .

Capacitor for the container 1 q1 − q 2 = c1 c1 = dp dt A1 & p1 = h1 ρg ρg ∴ q1 − q 2 = = A1 d ( h1 ρg ) × ρg dt A1 dh × ρg .q2 24 .Derive the relationship between the height of liquids in the two containers with time.q 2 h1 .ρg = R1 . 1 ρg dt = A1 .q 2 ( h1 − h2 ) ρg = R1 .ρg − h2 .(1) The q2= rate at which the liquid leaves the container that equals the rate at which it leaves the valveR1 ∴ p1 − p 2 = R1 . dh1 dt ----------.

dh1 -----------(3) dt Sub (2) in (1) q1 − ( h1 − h2 ) R1 The above equations describe how the height of liquid in container 1 depends on the input rate of flow. 25 .(5) q2 − h2 ρg dh = A2 2 R2 dt Sub (5) in (4) Sub (2) in (6) -----------------. dp dt = A2 .(4) The rate at which liquid leaves the container q3 equals to the rate at which it leaves the valve R2 For resistor p 2 − p 3 = R2 . Capacitor for container 2 q 2 − q3 = c 2 .(6) ( h1 − h2 ) ρg R1 − h2 .( h1 − h2 ) ρg = q R1 2 ------------------- (2) ρg = A1 . Fig.ρg dh = A2 2 R2 dt The above equations describe how the height of liquid in container 2 change with time.q 3 p3 = 0 ∴p 2 = R2 .q 3 = h2 ρg R2 ---------. dh 2 dt ---------------.

26 .

27 .

Thermal Resistance. Thermal resistance If Q is the rate of heat flow and (T2-T1) is the temperature difference. In case of conduction through solid Q = KA ( T2 − T1 ) L For this Rth = L KA When mode of heat transfer is convection.2. then Qth = (T2 − T1 ) Rth The value of Rth depends on mode of heat transfer. Q = Ah( T2 − T1 ) For this mode Rth = 1 Ah Thermal capacitance 28 . 1. Thermal Capacitance. there are only two building blocks.THERMAL SYSTEM BUILDING BLOCKS For thermal system.

It is a measure of the store of energy in a system. Q1 − Q2 = m × c Q1 − Q2 = C h × dT dt dT dt Q1= rate of flow of heat into the system. Ch= thermal capacitance BUILDING UP A MODEL FOR THERMAL SYSTEM 29 . Q2= rate of flow of heat out from the system M= mass dT = Rate dt C= specific heat. of change of temperature.

30 .

31 .

` 32 .

34 .

ROTATIONAL – TRANSLATIONAL SYSTEMS 35 .

MECHANICAL SYSTEMS POTENTIOMETER 36 .ELECTRO.

HYDRAULIC – MECHANICAL SYSTEMS 37 .

38 .

39 .

40 .

41 .

42 .

e. Control modes: 43 .g. the control modes as they are termed.CONTROLLERS Open-loop control is essentially just a switch on-switch off form of control. an electric fire is either switched on or off in order to heat a room. which occur with continuous processes. i. a controller is used to compare the output of a system with the required condition and convert the error into a control action designed to reduce the error. In this chapter we are concerned with the ways in which controllers can react to error signals.e. With closed-loop control systems.

TWO – STEP MODE 44 .

Oscillations with two step mode Two step control with two controller switch points 45 .

PROPORTIONAL MODE (P) 46 .

47 .

DERIVATIVE CONTROL (D) 48 .

PROPORTIONAL PLUS DERIVATIVE CONTROL (PD)

49

INTEGRAL CONTROL (I)

50

51

PROPORTIONAL PLUS INTEGRAL CONTROL (PD) 52 .

PID CONTROLLERS 53 .

54 . 2) Executes control programs 3) Provides the output to the correction elements. The controller performs the following functions: 1) Receives input from sensors.DIGITAL CONTROLLERS The digital controller requiring inputs which are digital. process the information in digital form and give an output in digital form. These samples are then converted into digital signals which are compared by the microprocessor with the set point value to give the error signal. The error signal is processed by a control mode and digital output is produced. The fig shows the digital closed – loop control system which can be used with a continuous process. The clock supplies a pulse at regular time intervals. As several control systems have analog measurements an analog – to digital converters (ADC) is used for the inputs. and dictates when samples of controlled variables are taken by ADC.

because the motor system is likely to be second order. Consider the problem of controlling the movement of a load by means of a motor. This is an example to control velocity. generally offer processing by an DAC since correction elements generally require analog signals. VELOCITY CONTROL A second order system with proportional control system will take more time to reach the required output when step input is given. Sequence of operation 1) Samples the measured value. proportional control will lead to the system output taking time to reach the required displacement when step input is given.The digital output. can be used to initiate the corrective action. Such a system is shown in the fig. 3) Send the output signal to DAC 4) Waits until the next samples time before repeating the cycle. 55 . 2) Compares this measured value with the set value and stored values of previous inputs and outputs to obtain the output signal.

Often the control parameters of the process changes with time (or) load. can be obtained by using the PD control. Therefore returning of the system is desirable. 56 .A higher speed response. The adaptive control system can be considered to have three stages of operation. This is termed as velocity feed back. The alternative to this is an adaptive control system which adapts to changes and changes its parameters to fit the circumstances prevailing. This will alter the transfer functions of the system. and integral constant until the operator decides to retune. with fewer oscillations. for the controllers. The velocity feed back might involve the use of a tacho-generator giving a signal proportional to the rotational speed of the motor shaft and hence the rate at which the displacement is changing and the displacement might be monitoring using a rotary potentiometer. 1) Starts to operate with controller conditions set on the basis of an assumed condition. An alternative of achieving the same effect and this is by the use of a second feedback loop that gives a measurement related to the rate at which the displacement is changing. ADAPTIVE CONTROL The adaptive controllers change the controller parameter to adapt to the changes and fit the prevailing circumstances. OR For a control system it has been assumed that the system once tuned retains its value of proportional. derivative. 2) The designed performance in continuously compared with the actual system performance.

present changes in the parameter of the controller are made on the basis of some auxiliary measurement of some process variable. The term gain – scheduled control was used because the only parameter originally adjusted was to gain is kp Self tuning 57 . Gain scheduling control With gain scheduling control. Adaptive control system can take a number of forms. Self – tuning control 3. Model – reference adaptive control. Gain scheduling control 2. The three commonly used forms are: 1.3) The control system mode and parameters are automatically and continuously adjusted in order to minimize the difference between the desired and actual system performance.

Model – reference control Model reference system is an accurate model of the system is developed. This response is compared to the desired response and the control parameters are adjusted. When the operator presses a button. The set value is then used as input to both model systems and actual systems and the difference between the actual output and output from the model compared. the controller injects a small disturbance into the system and measures the response.With self tuning control system continuously tunes its own parameter based on monitoring the variable that the system is controlling. The difference in these signals is then used to adjust the parameters of the controller to minimize the difference.tuning is found in PID controllers. It is generally refers to auto.tuning. 58 . Self.

Since the advent of the IC in the mid1970s.1970s.MICROPROCESSOR’S CONTROL A microprocessor is a programmable digital electronic component that incorporates the functions of a central processing unit (CPU) on a single semi conducting integrated circuit (IC). or hand held device. Microprocessors are now rapidly replacing the mechanical cam operated controllers and being used in general to carry out 59 . decodes and executes instructions. embedded system. It is used as CPU (Central Processing Unit) in computers. the microprocessor has become the most prevalent implementation of the CPU. so that the transistors of its logic circuits would fit onto a single part. The microprocessor was born by reducing the word size of the CPU from 32 bits to 4 bits. Microprocessors made possible the advent of the microcomputer in the mid. the cost of processor power was greatly reduced. which fetches (from memory). Definition The microprocessor is a program controlled semiconductor device (IC). nearly completely replacing all other forms. By integrating the processor onto one or a very few large-scale integrated circuit packages (containing the equivalent of thousands or millions of discrete transistors). One or more microprocessor typically serves as the CPU in a computer system.Before this period. electronic CPUs were typically made from bulky discrete switching devices (and later small-scale integrated circuits) containing the equivalent of only a few transistors.

They have the great advantage that a greater variety of programs became feasible. 60 .control functions.

REGISTERS 61 .

1. Temporary Registers a) Temporary Data Register 62 . it is an internal operation. The efficient programmer prefers to use these registers to store intermediate results than the memory locations which require but access and hence more time to perform the operation. 2. General purpose registers registers but access is not required. Thus it provides an efficient way to store intermediate results and use them when required.

For example. The contents of register B are transferred to temporary data register for applying second input to the ALU. These registers are not available for programmer. XCHG instruction exchanges the contents of H with D and L with E. The addition operation is performed by ALU.The ALU has two inputs. This instruction pushes the current PC contents onto the stack and loads the given address into the PC. The programmer cannot access this temporary data register. The ALU takes inputs from register A and temporary data register. ADD B is the instruction in the arithmetic group of instructions which adds the contents of register A and register B and stores result in register A. b) 'W and Z Registers W and Z registers are temporary registers. The given address is temporarily stored in the W and Z registers and placed on the bus for the fetch cycle. These registers are used to hold 8-bit data during execution pf some instructions. it is internally used for execution of most of the arithmetic and logical instructions. since 8085 uses them internally. However. At the time of exchange W and Z registers are used for temporary storage of data. Use of W and Z Registers The CALL instruction is used to transfer program control to a subprogram or subroutine. One input is supplied by the accumulator and other from temporary data register. 63 . Thus the program control is transferred to the address given in the instruction.

input/output (1/0) operations. and store operations. logic. S-sign flag After the execution of arithmetic or logical operations. In a given byte if D. b) Flag Register It is an 8-bit register. It is extensively used in arithmetic. Most of the times the result of arithmetic and logical operations is stored in the register A. The zero flag is also set if a certain register content becomes zero following an increment or decrement operation of that register. Special Purpose Registers a) Register A (Accumulator) It is a tri-state eight bit register. in which five of the bits carry significant information in the form of flags: S (sign flag). If D is 0. the number will be considered as positive number. Hence it is also identified as accumulator. if bit D. the number will be viewed as negative number.3. The zero flag sets if the result of operation in ALU is zero and flag resets if result is non zero. of the result is 1. P (parity flag) and CY (carry flag). the Sign flag is set. Z (zero flag). is 1. AC (auxiliary carry flag). load. as well as in. as shown in figure. 64 .

.AC-Auxiliary Carry Jag This flag is set if there is an overflow out of bit 3. i.e. If the parity is odd. flag is reset.e. 65 . This flag is used for BCD operations and it is not available for the programmer. bit). bit to D. even parity. After an arithmetic or logical operation if the result has an even number of ones. carry from lower nibble to higher nibble (D. i. CY-carry flag This flag is set if there is an overflow out of bit 7. P-Parity Flag Parity is defined by the number of ones present in the accumulator. the processor first fetches the opcode of instruction from memory (i. it places an address on the address bus and memory responds by placing the data stored at the specified address on the data bus). c) Instruction Register In a typical processor operation.e. In both the examples show below. the flag is set. The carry flag also serves as a borrow flag for subtraction. the carry flag is set.

How processor increments program counter depends on the nature of the instruction. for two byte instruction it increments program counter by two and for three byte instruction it increments program counter by three such that program counter always points to the address of the next instruction. 4. In conditional JUMP and conditional CALL instructions.The CPU stores this opcode in a register called the instruction register. Sixteen Bit Registers a) Program Counter (PC) Program is a sequence of instructions. The processor then fetches the next instruction from the new address specified by JUMP or CALL instruction. the processor increments program counter by three so that it points the instruction followed by conditional JUMP or CALL instruction. stores the address of the next instruction to be fetched. As mentioned earlier. The program counter is a special purpose register which. if the condition is not satisfied. In case of JUMP and CALL instructions. at a given time. 66 . address followed by JUMP and CALL instructions is placed in the program counter. otherwise processor fetches the next instruction from the new address specified by JUMP or CALL instruction. for one byte instruction it increments program counter by one. This opcode is further sent to the instruction decoder to select one of-the 256 alternatives. microprocessor fetches these instructions from the memory and executes them sequentially. Program counter acts as a pointer to the next instruction.

It gives the information about which machine cycle is currently 67 . the processor first fetches the opcode of instruction from memory and stores this opcode in the instruction register. The arithmetic unit bitwise fundamental arithmetic operations such as addition and subtraction. OR and EX-OR. ALU and external peripheral signals (explained in later sections) depending on the nature of the instruction. It is then sent to the instruction decoder. as well as rotate and clear. AND. Instruction Decoder As mentioned earlier. The logic unit performs logical operations such as complement. ARITHMETIC LOGIC UNIT (ALU) The 8085'sALU performs arithmetic and logical functions on eight bit variables. the data buffers. A 16-bit stack pointer is used to hold the address of the most recent stack entry. The ALU also looks after the branching decisions.b) Stack Pointer (SP) The stack is a reserved area of the memory in the RAM where temporary information may be stored. The instruction decoder decodes it and accordingly gives the timing and control signals which control the register. The 8085 executes seven different types of machine cycles.