# im trying to model the drive train model of wind turbine, i need to get oscillation and the steady state waveform

6 views (last 30 days)
peddada sandhya rani on 25 Mar 2023
Answered: Sam Chak on 25 Mar 2023
dwt/dt=1/2Ht(Tt-Tsh)
dwr/dt=1/2Hg(Tsh-Te)
Tsh=k*thetatw+c*dtheta_tw/dt
dtheta_tw/dt=welb(wt-wr)
thetatw=3.35
wt=1
wr=1

VBBV on 25 Mar 2023
Provide all inputs to the equations used for modeling the drive train,
clc
clear all
close all
a=3.2; %input('Enter the a = ');
b=1.5; %input('Enter the b = ');
c=.1;%input('Enter the c = ');
%initial condition
theta_0=[a,b,c];
t_span=linspace(0,100,100);
[t,results]=ode45(@(t,theta)ode_fun(t,theta),t_span,theta_0);
subplot(211)
plot(t,results(:,2));
subplot(212)
plot(t,results(:,3));
xlabel('t')
ylabel('wt&wg') function [dtheta_dt]= ode_fun(t,theta)
Tt=1;
Te=0.78;
f=50;
welb=2*pi*f;
Ksh=0.3;
Csh=0.01;
Ht=4;
Hg=0.1*Ht;
wt=theta(1);
wg=theta(2);
thetatw=theta(3);
dthetatw_dt=welb*(wt-wg);
thetatw=3.35;
wt=0.1;
wr=0.01;
c = 0.1; % give damping constant factor
k = 2.6e8; % give flexural stiffness of gear train , e.g. shown
dtheta_tw_dt=welb*(wt-wr);
Tsh=k*thetatw+c*dtheta_tw_dt;
dwt_dt=(1/2)*Ht*(Tt-Tsh); % what are these for ? another model ?
dwr_dt=(1/2)*Hg*(Tsh-Te); % this one too
Dwt_dt=((Tt/(2*Ht))-((Ksh/(2*Ht))*thetatw)+((Csh/(2*Ht))*(welb*(wt-wg)))); % check these equations
Dwg_dt=(((Ksh/(2*Hg))*thetatw)-((Csh/(2*Hg))*(welb*(wt-wg)))+(Te/(2*Hg))); % check these
dtheta_dt=[dthetatw_dt;Dwt_dt;Dwg_dt];
end

Sam Chak on 25 Mar 2023
In the absence of the effects of the constants and in the original math model, then the system is stable.
If oscillations are desired, then you need to inject some manipulated variables so that the system behavior can be changed. I'm unfamiliar with your system. In physical systems, the manipulated variables can forces, torques, voltage sources, etc.
theta_0 = [0.1, -0.2, 1];
t_span = linspace(0, 10, 10001);
options = odeset('AbsTol', 1e-16, 'RelTol', 1e-12);
[t, theta] = ode45(@(t,theta) ode_fun(t, theta), t_span, theta_0, options);
subplot(311)
plot(t, theta(:,1)), grid on, ylabel('\omega_{t}')
subplot(312)
plot(t, theta(:,2)), grid on, ylabel('\omega_{g}')
subplot(313)
plot(t, theta(:,3)), grid on, ylabel('\theta_{tw}'), xlabel('t') function [dtheta_dt]= ode_fun(t, theta)
% Parameters
Tt = 1;
Te = 0.78;
f = 50;
welb = 2*pi*f;
Ksh = 0.3;
Csh = 0.01;
Ht = 4;
Hg = 0.1*Ht;
wt = theta(1);
wg = theta(2);
thetatw = theta(3);
% Test 1: without manipulated variables, without constant disturbances
% dwt_dt = 0*Tt/(2*Ht) - Ksh/(2*Ht)*thetatw - Csh/(2*Ht)*welb*(wt - wg);
% dwg_dt = Ksh/(2*Hg)*thetatw + Csh/(2*Hg)*welb*(wt - wg) - 0*Te/(2*Hg);
% dthetatw_dt = welb*(wt - wg);
% Test 2: with manipulated variables
A = [ -pi/8 pi/8 -3/80;
5*pi/4 -5*pi/4 3/8;
100*pi -100*pi 0];
B = eye(3);
p = [-1, -2i, +2i]; % desired eigenvalues
K = place(A, B, p);
% Manipulated variables
u1 = - K(1,:)*theta - Tt/(2*Ht); % also cancel out effect of Tt/(2*Ht)
u2 = - K(2,:)*theta + Te/(2*Hg); % also cancel out effect of Te/(2*Hg)
u3 = - K(3,:)*theta;
dwt_dt = Tt/(2*Ht) - Ksh/(2*Ht)*thetatw - Csh/(2*Ht)*welb*(wt - wg) + u1;
dwg_dt = Ksh/(2*Hg)*thetatw + Csh/(2*Hg)*welb*(wt - wg) - Te/(2*Hg) + u2;
dthetatw_dt = welb*(wt - wg) + u3;
% Reorder the sequence because thetatw = theta(3)
dtheta_dt = [dwt_dt;
dwg_dt;
dthetatw_dt];
end