Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

jus need equation that i can place instead of question marks this is e part % In this task the individual input values were assigned

jus need equation that i can place instead of question marks this is e part

% In this task the individual input values were assigned to you via

% specially written sub-script. So, don't be surprised and confused

% if you have different values with your groupmates!

% To start, the initial values must be loaded. Please type your personal

% student number here by replacing the ??? :

Student_number = 152526735; % Replace ??? by the student number.

% After the following sub-script is called, your individual initial values

% are loaded and can be used. Note, that your individual values are

% assigned to you by the student number, and thus, reloading of the

% web-page, multiple running of the script, or interrupting the exercise

% will not result in new values generation.

Individual_values_SN_Ex7_T2e % here we just call the sub-script, containing individual input data values

% You don't have to type the initial data by yourself. After the

% sub-script is run, the following assigned to you values are loaded into

% Matlab grader memory and can be addressed in calculations using the

% following variables:

U_ph; % Converter maximum output voltage, in [V]

I_s; % Converter rated current, in [A]

% In your calculation use p.u. values or SI units.

% You can start completing the script now. Or, if you want to get familiar

% with your individually given initial numbers, you can run the empty script

% and see the numbers in the "output" box. After doing that, you can

% continue working on the script and finalize the task.

% ATTENTION: To see your individual input values when the script is not completed, you

% should comment all the remaining script part! To do so, put the symbols

% " %{ " right on the next empty line:

% and the paired closing command " %} " on the latest line in this script.

% Otherwise, an error message will appear and no data will be shown.

% Pay extra attention and ensure that you have correctly pasted your student number!

% Otherwise, even correctly completed script will be considered as failed.

% In addition to individually give values, the task requires some machine

% parameters data, which given in Table I of the Exercise 7 summary. Please

% fill the following input data. Replace ??? with the given values. Use SI or p.u. units.

U_s_ph_N = ???; % Stator rated voltage (phase voltage), in [V]

I_s_N = ???; % Stator rated current, in [A]

psi_PM = ???; % Permanent magnet flux linkage, in [Vs]

psi_PM_pu = ???; % Permanent magnet flux linkage, in [p.u.]

f_N = ???; % Rated frequency, in [Hz]

L_d_pu = ???; % d-axis inductance, in [p.u.]

L_q_pu = ???; % q-axis inductance, in [p.u.]

% The value calculated from Task 2c:

f_DC_limit = 171.24; % The frequency, when the maximum DC voltage is reached, in [Hz]

% Now we are ready to start the solving process.

% Step 1. Find the actual and rated angular speed.

% Please use the variable "omega_s" for actual angular speed

% and "omega_N" for rated angular speed.

% Replace ??? with the correct equation.

omega_s = ???; % Actual angular speed, must be in [rad/s]

omega_N = ???; % Rated angular speed, must be in [rad/s]

% Step 2. Find EMF caused by the permanent magnet

% Please use the variable "e_PM" for EMF. Replace ??? with the correct equation.

e_PM = ???; % EMF caused by the permanent magnet, must be in [V]

% Step 3. Find the motor quantities in p.u. values

% Please use the variables:

% "u_s_pu" for ststor voltage p.u. value;

% "i_s_pu" for ststor current p.u. value;

% "e_PM_pu" for EMF p.u. value;

% "omega_s_pu" for angular speed p.u. value;

% Replace ??? with the correct equations.

u_s_pu = ???; % Stator voltage, must be in [p.u.]

i_s_pu = ???; % Stator current, must be in [p.u.]

e_PM_pu = ???; % Permanrnt magnet EMF, must be in [p.u.]

omega_s_pu = ???; % Actual angular speed, must be in [p.u.]

% Step 4. Find the stator flux linkage p.u. value

% Please use the variable "psi_s_pu" for stator flux linkage.

% Replace ??? with the correct equation.

psi_s_pu = ???; % Stator flux linkage p.u. value, must be in [p.u.]

% Step 5. Find d-axis current p.u. value.

% Please use the variable "i_d_pu" for d-axis current in p.u.

% Here we should complete the symbolic equation and solve it.

% In the equation, name the unknown d-axis current value as "x"

syms x % define "x" as symbolic variable

roots = solve(psi_s_pu^2 == (psi_PM_pu-L_d_pu*x)^2+L_q_pu^2*(i_s_pu^2-x^2), x); % Write the equation here

roots = double(roots);

% The equation has 2 roots: one is adequate, another is enormously large.

% To chose the correct root, let's assume that the expected current will

% not exceed 2 p.u.

if abs(roots(1))<2 % d-axis current in [p.u.] will be chosed from the equation roots

i_d_pu = roots(1);

elseif abs(roots(2))<2

i_d_pu = roots(2);

else

return

end

% Step 6. Find q-axis current p.u. value.

% Please use the variable "i_q_pu" for d-axis current in p.u.

% Replace ??? with the correct equation;

i_q_pu = ???; % q-axis current, must be in [p.u.]

% Step 7. Find the load angle

% Please use the variable "delta_s" for load angle. Replace ??? with the correct equation.

delta_s = ???; % Load angle, must be in [deg] or [rad]

% Step 8. Find the angle between the d-axis and stator current.

% Please use the variable "alpha" for that angle. Replace ??? with the correct equation.

alpha = ???; % Alpha angle, must be in [deg] or [rad]

% Step 9. Find the angle between current and voltage.

% Please use the variable "phi" for that angle. Replace ??? with the correct equation.

phi = ???; % Angle "phi", must be in [deg] or [rad]

% Step 10. Find the power factor.

% Please use the variable "cos_phi" for the power factor.

% Replace ??? with the correct equation.

cos_phi = ???; % Power factor

% Step 11. Draw the vector diagram.

% Diagram will be built for p.u. values!

% Please keep all pre-defined variables unchanged. However, it is not forbidden to

% create new variables, if you need it.

% % The code is already done for you. Look through it and correct it, if needed.

% Sub-step 11a: create the empty figure and axes

Fig_1=axes;

axis equal

hold on; % Here we set all further lines to be drawn on these axes.

grid on; % Switch on te grid here

% Sub-step 11b: Create the vectors for plotting.

% Here we should prepare the vectors as complex numbers.

% As far as we know the absolute values and angles between the vectors, it

% becomes the easiest way to write them as complex numbers in exponential form.

% REMEMBER: In the exponential form the angle must be written in radians! If

% you have used degrees in your prior calculation, consider using the

% command "deg2rad" here.

vector_psi_PM=psi_PM_pu; % Permanent magnet flux linkage vector.

vector_psi_s=psi_s_pu*exp(j*(delta_s)); % Stator flux linkage vector

vector_i_s=i_s_pu*exp(j*(delta_s+0.5*pi+phi)); % Stator current vector

vector_u_s=u_s_pu*exp(j*(delta_s+0.5*pi)); % Stator voltage vector

% Sub-step 11c: Build the main vectors on the figure.

% Command "compass" will be used here.

V1=compass(vector_psi_PM); % Build "Permanent magnet flux linkage vector"

V2=compass(vector_psi_s); % Build "Stator flux linkage vector"

V3=compass(vector_i_s); % Build "Stator current vector"

V4=compass(vector_u_s); % Build "Stator voltage vector"

% Sub-step 11d: add the d- and q- components of the stator magnetic flux and stator current.

% Before building, we should define the desired vectors in exponential form.

vector_L_d_i_d= -(L_d_pu*i_d_pu); % d-axis component of the stator flux [p.u]

vector_L_q_i_q=(L_q_pu*i_q_pu)*exp(j*(0.5*pi)); % q-axis component of the stator flux [p.u]

% Vectors are defined. We can draw them on our plot now.

% Sub-step 11e: build the additional components.

% Command "quiver" will be used to build the additional vectors

% Command "quiver" has the following syntax:

% quiver(x1,y1,x2,y2,0),where:

% x1 - starting point x-coordiate

% y1 - starting point y-coordiate

% x2 - vector length along the x-axis

% y2 - vector length along the y-axis

% 0 - For single vectors building just leave 0 here.

% Build d- and q- components of the stator flux linkage:

AV1=quiver(real(vector_psi_PM+vector_L_q_i_q),imag(vector_psi_PM+vector_L_q_i_q),real(vector_L_d_i_d),imag(vector_L_d_i_d),0); % Graphical object for Stator flux linkage d-component

AV2=quiver(real(vector_psi_PM),imag(vector_psi_PM),real(vector_L_q_i_q),imag(vector_L_q_i_q),0); % Graphical object for Stator flux linkage q-component

% Sub-step 11f: indicate d- and q- axes.

% It is enough to draw short arrows to indicate axes directions

d_axis=0.2; % d-axis direction vector

q_axis=0.2*exp(j*0.5*pi); % d-axis direction vector

% Build them

Dax=compass(d_axis); % Graphical object for d-axis direction vector

Qax=compass(q_axis); % Graphical object for q-axis direction vector

% Sub-step 11g: Tune the drawn vectors' color and line thickness.

% Here we set the line thickness for the main vectors.

% Set the line thickness "2" for vectors V1 - V4.

set(V1,'linewidth',2);

set(V2,'linewidth',2);

set(V3,'linewidth',2);

set(V4,'linewidth',2);

% Further we set the line thickness for additional vectors.

set(AV1,'linewidth',1);

set(AV2,'linewidth',1);

% Set line thickness "3" for d- and q- axes Graphical objects (i.e. for

% "Dax" and for "Qax").

set(Dax,'linewidth',3);

set(Qax,'linewidth',3);

%Now, set different colors for different Graphical objects

set(V1,'Color','b'); % let ths object to be blue

set(V2,'Color','r'); % make it red

set(V3,'Color','g'); % make it green

set(V4,'Color','m'); % make it magenta

set(AV1,'Color','b');% make it blue

set(AV2,'Color','r');% make it red

set(Dax,'Color','k');% make it black

set(Qax,'Color','y');% make it yellow

% Also, make lines of additional vectors as dashed lines.

set(AV1,'LineStyle','--');

set(AV2,'LineStyle','--');

% Sub-step 11h:

% Complete the legend.

% NOTE: when typing legend or title, Matlab can understand and implement TEX-code.

% Please try to understand how these legend labels were coded and see how

% they look on the output figure. Making the correct legend is also

% important, and in future tasks, you have to write the legend by yourself!

% Some help: Symbol "\" is a special symbol and goes before the TEX commands.

% "\it" means "start writing in italic"

% " m" means "start writing in roman"

% "_" means subscript

% "{...}" shows what should be written as a subscript. If you do not

% indicate the whole subscript as {...} than only one coming letter

% will go down to the subscript, and others - not.

% Greek letters can be written as "\alpha", "\beta", \psi", etc.

set(V1,'DisplayName','\it\psi_{ mPM}');

set(V2,'DisplayName','\it\psi_{ ms}');

set(V3,'DisplayName','\iti_{ ms}');

set(V4,'DisplayName','\itu_{ ms}');

set(AV1,'DisplayName','\itL_{ md}\iti_{ md}');

set(AV2,'DisplayName','\itL_{ mq}\iti_{ mq}');

set(Dax,'DisplayName','d-axis');

set(Qax,'DisplayName','q-axis');

legend('Location','eastoutside')

% Sub-step 11i:

% Create the title and name axis

title({'The space vector diagram'})

% Name axes as "x, p.u." and "y, p.u."

xlabel('x, p.u.')

ylabel('y, p.u.')

% Here Task 2e ends.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions