You are on page 1of 9

Homework 4

Mónica Hı́jar Navarro


Mechatronics Engineering
UP
October 16, 2022

Contents
1 Introduction 2

2 Points of the assignment 2


2.1 Plotting requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Diagram of the Systems 4


3.1 General System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 ABC modulation transformation to DQ domain . . . . . . . . . . . . . . . . . . . . . 4
3.3 Vdc2 to obtain Pref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.4 Vdcref , Pref and Idc systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.5 Compensator value obtained in sisotool . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Results of the assignment 6

5 Conclusions 6
5.1 Development of the practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5.2 Conclusions on the sensitivity of the active power . . . . . . . . . . . . . . . . . . . . 6
5.3 Conclusions on the performance of the control of the voltage source . . . . . . . . . . 7

Appendices 8

A Appendix 1 Matlab System Parameters 8

B Appendix 2 Matlab Simulation Run and Plots 8

List of Figures
1 Source changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Vdc2 control scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Profile references. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4 General System Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5 Tmabcdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 V dc2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7 Results for V dcref , Pref and Idc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
8 Compensator value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
9 Plots of the points asked. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1
1 Introduction
For the development of this document, the MatLab/Simulink program was used to build the system
and subsystems presented in the practice guide. In addition, the results of the different points of the
system that are requested are presented. Throughout the report, we will see the analysis of the graphs
and the system, so as their conclusions.

2 Points of the assignment


• 1. The starting point will be the circuit implemented in Matlab/Simulink on assignment 3.

• 2. Remove the DC voltage source and add a DC current source in parallel with a DC capacitor
as suggested in the figures below:

Figure 1: Source changes.

• 3. Use the following value for the DC capacitor’s capacitance: Cc=5000e-6; %dc link capaci-
tance in farad

• 4. Augment the control scheme by generating Pref from the DC voltage control loop as suggested
below:

Figure 2: Vdc2 control scheme.

• 5. Use 600 (V) for the reference voltage. Design a PI controller that yields acceptable transient
performance.

• 6. Notice that now your commands (references) are Vdc,ref and Qref . The interpretation of Qref
remains the same, that is, you would change Qref in order to inject adjustable reactive power
into the ac grid. Control over Vdc has two main functions. First, it may be desired to keep Vdc

2
constant if the main objective is to transfer a variable amount of dc power into the ac grid.
This means the controller should be able to keep Vdc = Vdc,ref as Idc changes. Second, some dc
power sources (e.g., photovoltaic systems) require adjustment of Vdc in order to operate at their
maximum power point. This means Vdc,ref may need to be adjusted in order to drive Vdc to
such operating point. The literature calls such control strategy maximum power point tracking
(MPPT).

To test these control objectives, run your simulation for the profiles below:

Figure 3: Profile references.

2.1 Plotting requests


• (i) Power stages

• (ii) Control stages

Illustrate representative signals (from both the power and control stages) and comment on your
results obtained.

3
3 Diagram of the Systems
3.1 General System

Figure 4: General System Diagram.

3.2 ABC modulation transformation to DQ domain

Figure 5: Tmabc
dq .

4
3.3 Vdc2 to obtain Pref

Figure 6: V dc2 .

3.4 Vdcref , Pref and Idc systems

Figure 7: Results for V dcref , Pref and Idc.

3.5 Compensator value obtained in sisotool

Figure 8: Compensator value.

5
4 Results of the assignment

Figure 9: Plots of the points asked.

5 Conclusions
5.1 Development of the practice
For this new assignment, we changed from a DC Voltage Source to a DC Controlled Current Source.
We added a capacitor to the general system to keep it balanced and we placed it to have an initial
power of 600 Volts charged in the capacitor. The Idc reference given in Figure 3 graph 2, is the input
value for this DC Controlled Current Source.

After that, we did the V dc2 system in order to get the value of Pref . We used as input values both
V dc voltages, the V dc regular input obtain from the general system, and the V dcref value given in
Figure 3 graph number 3.

As well, we did some changes in our modulation transformation. As shown in Figure 5 we changed
the V dc value inputs almost at the end of the transformation. We also changed the entrance of the
Pref value to the one we obtained with the V dc2 system presented in 6. The value of Qref changed to
the new one shown in Figure 3 graph 1.

We placed the values of V dcref and Idc given in the Figure 3 graphs 1 and 2, as we mentioned
before.

To finish with this system, we calculated the compensator value with help of the sisotool as shown
in Figure 8. We used a given equation for ”TpiV dc ”, also for the value of ”T auv ”, and the value of
”P o”. These values help to obtain the compensator values that we mentioned before.

5.2 Conclusions on the sensitivity of the active power


As we can see in Figure 9 graph 4, were the Power behavior is presented, we can analyze two changing
points. The first change we can observe is the one presented after 0.5 seconds of the analysis. We can

6
see that in graph 1 of Figure 9, the change in the Idc value is presented at time 0.5 as well. With
this step change, the value of the Voltage source changes as well. Now, for the changes shown after
1.5 seconds of analysis, we can see that it matches the value of V dcref presented in graph 3 of Figure
3. We also see these changes at the same time of 1.5 seconds at the V dc graph.

5.3 Conclusions on the performance of the control of the voltage source


Finally, as we can see from Figure 9 graph 3, the behavior of the changes in the value of the V dc
graph, is quite similar to the performance of the values of P and Pref explained in Point 5.2. We can
see at the beginning the performance is affected by the original new charge in the capacitor and the
new DC Controlled Current Source, but then it stabilizes. We used the controller to maintain the
V dc value to the one we need. The voltage value has a little change when we increase the Idc value
after 0.5 seconds of simulation, but an instant later it stays with the 600 volts value that we need
to have. It is not after we change the value of the V dcref , that we get to see also a little change in
the performance of the V dc value, but then it also preserves the new voltage value of 620 volts. This
shows that the controller works to maintain the voltage values, even if we have a current controller
source.

7
Appendices
A Appendix 1 Matlab System Parameters
1 % FILE HW4_MTLB . m
2
3 Vg =270; % AC GRID VOLTAGE
4 RMS = sqrt (2) / sqrt (3) ; % RMS CALCULATION
5 ph_g =0; % AC GRID PHASE ANGLE
6 Fp =60; % AC GRID FREQUENCY
7 R =1.458 e -4; % SERIES RESISTANCE
8 L =38.675 e -6; % FILTER INDUCTOR
9 Vdc =600; % DC LINK VOLTAGE
10 Cc =5000 e -6; % DC LINK CAPACITANCE
11 Vpeak = sqrt (2) *( Vg / sqrt (3) ) ;
12
13 Ti =0.5 e -3; % TAU VALUE
14
15 Kp = L / Ti ; % P VALUE OF THE PI
16 Ki = R / Ti ; % I VALUE OF THE PI
17
18 Po =100 e3 ;
19 Vd = Vpeak * cos ( ph_g ) ;
20 Tau_v =(2* L * Po ) /(3* Vd ^2) ;
21 T = tf ( 's ') ;
22 T_pi_Vdc =(1/( Ti * T +1) ) *((2/ Cc ) *((1+ Tau_v * T ) / T ) )

B Appendix 2 Matlab Simulation Run and Plots


1 % SCRIPT TO CALL HW4_MTLB . m
2
3 HW4_MTLB % LOAD SYSTEM PARAPETERS
4 tsim =9; % SIMULATION TIME
5 mysets = simset ( ' Solver ' , ' ode23tb ') ; % SIMULATION SETTINGS
6 T = sim ( ' HW4_SMLK . slx ' , tsim , mysets ) ; % SIMULATION SETTINGS
7
8
9 % - - - - - - - - - - - - - - - - - - - - - - - - - - HW4 PLOTS - - - - - - - - - - - - - - - - - - - - - - - - - -
10 figure (1)
11
12 % PLOT OF Idc
13 subplot (5 ,1 ,1)
14 hold on
15 plot ( out . tout , out . Idc . Data (: ,1) , ' Linewidth ' ,2 , ' color ' ,153/255*[0 0
1]) ;
16 hold off
17 axis ([0 2 480 620])
18 grid on
19 box on
20 ylabel ( ' Idc ' , ' FontSize ' ,7 , ' Interpreter ' , ' latex ') ;

8
21
22 % PLOT OF Qref
23 subplot (5 ,1 ,2)
24 hold on
25 plot ( out . tout , out . Qref . Data (: ,1) , ' Linewidth ' ,2 , ' color ' ,153/255*[0 1
0]) ;
26 hold off
27 axis ([0 2 -10000 110000])
28 grid on
29 box on
30 ylabel ( ' Qref ' , ' FontSize ' ,7 , ' Interpreter ' , ' latex ') ;
31
32 % PLOT OF Vdc
33 subplot (5 ,1 ,3)
34 hold on
35 plot ( out . tout , out . Vdc . Data (: ,1) , ' Linewidth ' ,2 , ' color ' ,153/255*[1 0
0]) ;
36 hold off
37 axis ([0 2 550 700])
38 grid on
39 box on
40 ylabel ( ' Vdc ' , ' FontSize ' ,7 , ' Interpreter ' , ' latex ') ;
41
42 % PLOT OF P AND PREF
43 subplot (5 ,1 ,4)
44 hold on
45 plot ( out . tout , out . Instant_Pout . Data (: ,1) , ' Linewidth ' ,2 , ' color '
,153/255*[1 0 1]) ;
46 plot ( out . tout , out . Pref . Data (: ,1) , ' Linewidth ' ,2 , ' color ' ,153/255*[0 1
1]) ;
47 hold off
48 axis ([0 2 280000 410000])
49 grid on
50 box on
51 ylabel ( 'P and Pref ' , ' FontSize ' ,7 , ' Interpreter ' , ' latex ') ;
52
53 % PLOT OF Q AND Q REF
54 subplot (5 ,1 ,5)
55 hold on
56 plot ( out . tout , out . Instant_Qout . Data (: ,1) , ' Linewidth ' ,2 , ' color '
,153/255*[1 1 0]) ;
57 plot ( out . tout , out . Qref . Data (: ,1) , ' Linewidth ' ,2 , ' color ' ,153/255*[1 1
1]) ;
58 hold off
59 axis ([0 2 -10000 110000])
60 grid on
61 box on
62 ylabel ( 'Q and Qref ' , ' FontSize ' ,7 , ' Interpreter ' , ' latex ') ;
63 xlabel ( ' Time ( sec ) ' , ' FontSize ' ,9 , ' Interpreter ' , ' latex ') ;

You might also like