OhmSweetOhm
  • Member for 5 years
  • Last seen more than a month ago
Solving an optimal control problem (LQR)
Accepted answer
10 votes

my solution A={{-1,0.5},{0.3,-1}}; B={{1},{1}}; x0={{1},{0}}; xT={{0},{1}}; You have to choose an end time T=10; Next you have to define the Hamilton function L[t_]=1/2(u[t]^2) lambda[t_]:={{l1[t]...

View answer
1D transient heat equation problem with controller - 2
Accepted answer
3 votes

Kp=2; m=0.001; tEnd = 1000; pde = {D[u[t, x], t] == 0.5 D[u[t, x], {x, 2}] + 0.25 Sin[t/50] + NeumannValue[0, x == 10]}; Mathematica doesn't like the mixed BCs but you can approximate the ...

View answer
RST controller in Mathematica
Accepted answer
2 votes

You have to add a few things to your code: Mathematica has to know that these are discrete time transfer functions and the constant T(z) has to be a TransferFunctionModel object as well. plant = ...

View answer
Does TransferFunctionModel have to be finite dimensional?
2 votes

a short answer pars=Rationalize[{L-> 6.9,A->0.0133,a0->410, c1a->0.003,c2a->0.002,c1p->-2.5 10^-6,c2p->4.3 10^-6}]; With the transfer function G[s_]=(a0 c1a (A Cosh[(...

View answer
Using NDEigensystem to solve coupled eigenvalue problem
2 votes

I have computed the analytic solution of the Eigenvalue problem above With the Eigenvalues \[Beta] -> Log[(Sqrt[A + a0 c1p] Sqrt[A - a0 c2p])/Sqrt[(A - a0 c1p) (A + a0 c2p)]] ev[k_] := (a0 (I k \...

View answer
Power Spectral Density of the Output Response of a Linear State Space Model
Accepted answer
2 votes

I think the problem is that you have not computed the PSD from a steady state. sys = StateSpaceModel[provalin]; naturalFreq = Abs[TransferFunctionPoles[sys]]/(2 Pi) // Flatten slv = Chop[...

View answer
Find optimal integer solution to linear equation (Wolfram Alpha)
1 votes

I know you don't have Mathematica but I post it for completeness f[x_,y_]:=76.61x+157.84y sol=Maximize[{f[x,y],1482<=f[x,y]<=1560,x>0,y>0},{x,y}\[Element]Integers] {1559.92, {x -> 8, y ...

View answer
Solve for input with given TransferFunctionModel
Accepted answer
0 votes

my solution. You can compute the inverse transferfuncion PT2[K_, T1_, T2_] := K/((1 + T1 s) (1 + T2 s)) BodePlot[PT2[1, 1 10^-5, 10 10^-5], ImageSize -> Medium] Pinv[s_] = TransferFunctionModel[1/...

View answer