• Document: MODELING FIRST AND SECOND ORDER SYSTEMS IN SIMULINK
  • Size: 209.53 KB
  • Uploaded: 2019-04-16 16:09:32
  • Status: Successfully converted


Some snippets from your converted document:

MODELING FIRST AND SECOND ORDER SYSTEMS IN SIMULINK First and second order differential equations are commonly studied in Dynamic Systems courses, as they occur frequently in practice. Because of this, we will discuss the basics of modeling these equations in Simulink. The first example is a low-pass RC Circuit that is often used as a filter. This is modeled using a first-order differential equation. The second example is a mass-spring-dashpot system. This system is modeled with a second-order differential equation (equation of motion). To better understand the dynamics of both of these systems were are going to build models using Simulink as discussed below. You should build both models first, then run them so you can compare how each system responds to the same input. Modeling a First Order Equation (RC Circuit) The RC Circuit is schematically shown in Fig. 1 below. R Vin C Vout Fig. 1. The RC Circuit. The differential equation for this is as show in (1) below. 1 x& = [f ( t ) − x ] (1) RC Where x& (xdot) is the time rate of change of the output voltage, R and C are constants, f(t) is the forcing function (Input voltage), and x is the output voltage. We are now going to take this piece by piece. First, we examine what is in the brackets and we notice that we are subtracting the term x from the term f(t). If we imagine that each of these terms outputs a signal, we can model this relationship as shown in Fig. 2 below. Fig. 2. Summing the input signals. Now we notice that the bracketed term [f(t) – x] is multiplied by a constant 1/RC. We do this in Simulink by passing the signal through a Gain block as in Fig. 3 below. Because all the terms on the right-side of xdot are accounted for, we know that the output signal must be equal to the left side of the equation, which is xdot. Modeling First and Second Order 1 rev. 090604 Systems Fig. 3. Applying a gain to the output. However, we are interested in x, not xdot. How can we take the xdot output signal and get an x output? The answer is to use an integrator block as in Fig. 4 below. Fig. 4. Integrating the output signal. Now, we have the desired x output, but we notice that x is also an input of the system. In our model above, the input x branch is a “dead” branch. In other words, there is no real signal going in there. How can we make x both an output and input of the system? The answer is to use a feedback loop by tapping the output x signal and feeding it back into the system at the input point. After some manipulation of the lines, your model should look like Fig. 5 below. Fig. 5. The finished Simulink model. After adding a Scope block, you are ready to set the block parameters, and run the simulation. But first, take the time to build the second-order model as described in the following section. Modeling a Second Order Equation (Single Degree of Freedom System-SDOF) The mass-spring-dashpot is a basic model used widely in mechanical engineering design to model real-world mechanical systems. It is represented schematically as shown in Fig. 6 below. m c k Fig. 6. The SDOF Mass-Spring-Dashpot. The response of this system is governed by the equation of motion which is a second-order differential equation, and is shown in (2) below Modeling First and Second Order 2 rev. 090604 Systems 1 &x& = [f ( t ) − cx& − kx ] (2) m Where &x& (xddot) is the acceleration of the mass m, x& (xdot) is the velocity, x is the displacement, f(t) is the forcing function (input force), c is the damping coefficient, and k is the spring constant. To model this system we start by looking at the terms in the bracket. There are three input signal lines: f(t), xdot, and x. We also notice that both xdot and x are multiplied by constants. As in the case of the first-order model; this can be done in Simulink by using a Gain block. The signals are then summed together as in Fig. 7 below. Fig. 7. Summing the input signals. Now, we notice that the bracketed term [f(t)- cxdot- kx] is multiplied by the constant 1/m. We do this in by passing the signal through a Gain block as in Fig. 8 below. Fig. 8. Applying a ga

Recently converted files (publicly available):