function [xcdot] = cst_eq3(xc,xd,t)
%
%  State-space model of [H9.15]
%
R2 = 50e3;
L1 = 1.5e-3;
C1 = 1e-6;
V0 = 10;
p = 50;
tp = 1/p;
%
global h
%
uR = xc(1);
prei0 = xd(1);
m0 = xd(2);
%
U0 = V0*sin(2*pi*t/tp);
iR = uR/R2;
s = (L1*prei0 + h*(U0 - uR))/(L1*(1 - m0) + h*m0);
uD = m0*s;
uL = U0 - uD - uR;
di0 = uL/L1;
i0 = prei0 + h*di0;
iC = i0 - iR;
duR = iC/C1;
%
xcdot = duR;
%
return