You are on page 1of 15

Simulink coursework CGC022 Yara al Wazir

Question 1 ( ) This function is a second order function. In order to tackle this question, the first step is to find the natural frequency The natural frequency of the function can be found using the following equation

( ) Where represents the natural frequency, system gain. Letter K is the damping ratio, and K is the

Description System gain Damping ratio (natural) frequency

Value 1 0 10

Therefore, by substituting these numbers into the equation and rearranging it, the natural frequency is found to be: ( )

Thus, the system was adjusted accordingly, as seen in Figure 1

Figure 1 - setup of the system

The natural frequency of the system is seen in Figure 2 i)

Figure 2 - Natural frequency of the system, w=sqrt(0.1)

ii)

Figure 3 - Input frequency 10% higher than the natural frequency, w=1.1 x sqrt(0.1)

iii)

Figure 4 - Input frequency 10% lower than natural frequency, w=0.9 x sqrt(0.1)

iv)

Figure 5 - Input frequency 10 times greater than the natural frequency, w=10 x sqrt(0.1)

v)

Figure 6 - Input frequency 10 times smaller than the natural frequency, w=0.1 x sqrt(0.1)

Question 2 ( ) ( )( )

This is a second order transfer function that can essentially be split into two individual first order transfer functions, which will be used to build the open loop process. ( ) The initial model can be seen in ( ) ( )

The scope shows the model; the yellow line indicates the process model, and the pink line indicates the FOPTD model. The target is to fit the pink line to the yellow line in a superimposable fashion. This is done by altering Transfer Fcn3. Trial and error was used to fit this model. The numerator is known (4, as it never changes from the original equation), and the first denominator coefficient was altered between 1-8 until the closest fit was found at 6.5; this can be seen in

Therefore, the equation of the model is ( )

b) The FOPTD model identified can be used to design a PID controller to simulate the closed-loop response of the system The PID model was built as seen in

However, before progressing, the parameters representing proportional gain, integral time, and derivative time must be set. In order to work KC out, the following equation was use (As per the Ziegler and Nichols model) ( ) Where as the function is a second-order function

) ,

Also, from the model simulated in question 2a, it was determined that and that Kp= 4

Thus, using equation __, the parameters were identified Parameter Kp Value Source 4 Model equation 6.5 Model equation 2 Model equation Kc 0.975 Equation __ 4 Equation ___ 1 Equation ___ Inserting these parameters into the model, the following output is achieved in

c)The model was adjusted to account for the real life simulation of the process. To achieve this, the block model was altered as seen in Figure 7, inserting the coefficients and in Transfer Fcn1 and Transfer Fcn5 respectively.

Figure 7- Block model simulation for true process

The product of this simulation can be seen in Figure 8

Figure 8 scopelarger

It is clear that the FOPTD model isnt an accurate representation of the real life situation. The real life situation is the yellow line; the pink line does not have the initial dip that the yellow line has. Thus, the simulation needs further modelling t o represent real life sittuations. This can be seen clearly in Figure 9

Figure 9 diplarger

To accurately simulate the real process, the PID controllwer was introduced to the system, in addition to the coefficients. This is seen in Figure 10

Figure 10 q2c2initialbuild

The aggregated results of this block model simulation appears in Figure 11. The red line represents when . The cyan blue line represents when The yellow line simulates a standard step function. The purple line represents the standard step function when . It can be seen that the results display a similar pattern when magnified, but at different amplitudes.

Figure 11q2c2alltogether

Q2d The stability of the system is inherently linked to the value of the gain. The point at which the system becomes unstable is when the response of the system changes with an increase in value of the input The threshold for instability was found to be when , as seen in Figure 12. Simulation of where and can be seen in Figure 13 and Figure 14 respectively

Figure 12 simulation of instability where =0.25

Figure 13 =0.2

Figure 14 =0.3

You might also like