Im trying to model a two coil (AC) wireless power transfer. Could anyone help me with my code? (Solving differential equations).
Show older comments
Im trying to solve a two coil power transfer circuit on Matlab using AC supply. Can anyone help me? This is what i have done so far:
Im getting an error in line 17.
syms I_1(t) I_2(t)
syms t
w=4;
t=0:pi/100:2*pi; %this creates a vector of values for t, from 0 to 2*pi in pi/100 increments.
y=sin(w*t); %takes sin of w * all the values in the t vector plot(t,y)
V_0 = y; %maximum voltage
R_1 = 10; %resistor 1
R_2 = 20; %resistor 2
L_1 = 0.055; %inductor 2
L_2 = 0.075; %inductor 2
k = 0.75; %coupling coefficient
M_12 = k*sqrt(L_1*L_2); %caculating mutual inductance
ode1 = diff(I_1) == (V_0- (R_1*I_1)+(M_12*I_2))/L_1;
ode2 = diff(I_2) == ((R_2*-I_2)-(M_12*I_1))/L_2;
odes = [ode1; ode2];
S = dsolve(odes);
I_1Sol(t) = S.I_1;
I_2Sol(t) = S.I_2;
[I_1Sol(t), I_2Sol(t)] = dsolve(odes);
cond1 = I_1(0) == 0;
cond2 = I_2(0) == 1;
conds = [cond1; cond2];
[I_1Sol(t), I_2Sol(t)] = dsolve(odes,conds);
fplot(I_1Sol)
hold on
fplot(I_2Sol)
grid on
legend('I_1Sol','I_2Sol','Location','best')
1 Comment
M
on 31 Oct 2017
This will not answer your question, but why are you defining syms t and then redefining t = 0:pi/100:2*pi ?
Accepted Answer
More Answers (1)
Matheus Marchiori
on 9 Apr 2019
0 votes
Hi Jack. Can you send the full script after this changes? Thank you!
Categories
Find more on Numeric Solvers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!