Skip to content

Instantly share code, notes, and snippets.

@0xff07
Created October 19, 2016 13:26
Show Gist options
  • Save 0xff07/71245ef96bc362b285bb3c65948d758d to your computer and use it in GitHub Desktop.
Save 0xff07/71245ef96bc362b285bb3c65948d758d to your computer and use it in GitHub Desktop.
syms Ka;
syms s;
syms K1;
syms R;
syms T;
G = 9/(s^2 + 2*0.2*3*s + 9);
G = simplify(expand(G));
Gc = simplify(expand(Ka * G));
H = simplify(expand((Gc)/(1 + K1*Gc)));
S_HKa = simplify(expand(diff(log(H), Ka, 1)*Ka));
S_HK1 = simplify(expand(diff(log(H), K1, 1)*K1));
pretty(S_HKa)
pretty(S_HK1)
Y =simplify(expand(R * H + T / Ka * H));
pretty(Y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment