Você está na página 1de 9

Control Systems

Lab 2

Simulation of an Electrical System

Azamat Omarov ID201102658 Mechanical engineering

The lab session 2 was mainly focused on representing the circuits by block diagrams using Simulink and MATLAB to be abke to solve numerically for their responses. We considered one circuit and simulated the response of the sinusoidal input.

The aims of that laboratory was to simulate the electrical system discussed in the textbook and plots their response within three different frequencies. (Namely 0.05Hz, 0.5Hz and 1Hz) Firstly, the circuit itself was constructed for reference through circuitlab to show the voltage nodes of the systems.

Figure1. Circuit of simulated elecctrical system

After that Simulink was used to plot diagrams and then express their responses with the change in frequency.

Figure2. Simulink diagram of the given circuit

After completing the plot the code for simulation was completed in the main MATLAB with all available constant data.

0.05HZ 1 task
>> R1=2; R2=2; R3=4; L=0.5; C1=1; C2=4; sim('azamat_omarov') >> subplot(2,1,1) %upper plot plot(t,ei); grid xlabel('Time(s)') ylabel('Voltage(V)') text(14.0,3.9,'e_{i}') axis([0 50 -5.3 5.3]) subplot(2,1,2) %lower plot plot(t,eA, '--',t,eo); grid xlabel('Time(s)') ylabel('Voltage(V)') text(15.0,2.5,'e_A') text([18.0, -0.4, 'e_o'])

0.5HZ 2 task
>> sim('azamat_omarov') subplot(2,1,1) %upper plot plot(t,ei); grid xlabel('Time(s)') ylabel('Voltage(V)') text(8.0,3.9,'e_{i}') axis([0 50 -5.3 5.3]) subplot(2,1,2) %lower plot plot(t,eA, '--',t,eo); grid xlabel('Time(s)') ylabel('Voltage(V)') text(8.0,2.4,'e_A') text([7.0, 0, 'e_o'])

1HZ 3 task
R1=2; R2=2; R3=4; L=0.5; C1=1; C2=4; >> sim('azamat_omarov') >> subplot(2,1,1) >> subplot(2,1,1) >> plot(t,ei); grid >> xlabel('Time(s)') >> ylabel('Voltage(V)') >> text(0.5,4, 'ei') >> text(0.5,5, 'ei') >> axis([0 20 -5 5]) >> subplot(2,1,2) >> plot(t,eA,'--',t,eo); grid >> xlabel('Time(s)') >>ylabel('Voltage(V)') >> axis([0 20 -2 2]) >> text(0.5,0.5,'eA') >> text(2,0,'eo')

Discussion
After plotting of all diagrams deep analysis was held through solving the third order differential equation presented on page 150 of the textbook.

According to the known rules of solving third-order differential equations we know that the general solution will consist of complementary and particular solutions. But the data available is still not enough to solve for constant values C1 C2 C3 since initial conditions should have been given.

e_O e_A

f = 0.05 Hz 231.5mV 2.47V

f=0.5 Hz 51.4mV 756mV

f=1 Hz 11.35mV 390.2mV

From the obtained results it can be clearly noticed that although the input voltage amplitude was constant and equal to 5V the output voltage amplitudes were observed to be inversely proportional to the change in frequency. (Higher frequency, less voltage) Additionally, it was noticed that time for stabilization is directly proportional to the change in frequency. Hence it took more time for the same circuit but with the frequency of 1Hz to stabilize than the same but with the less frequency. From the plots constructed it was also observed that as the frequency of input AC voltage was increased the decrease in the period of both eA and eO was clearly seen. And thus, it can be stated that frequency of input voltage is directly proprtional to the change in eA and eO frequency.

Você também pode gostar