Skip to content

Instantly share code, notes, and snippets.

@radiosilence
Created December 9, 2009 05:46
Show Gist options
  • Save radiosilence/252290 to your computer and use it in GitHub Desktop.
Save radiosilence/252290 to your computer and use it in GitHub Desktop.
% System 4: Wien Bridge Oscillator
K = 3; R1 = 10*10^3; R2 = R1; C1 = 10*10^-9; C2 = C1;
tra = tf( [ K*R2*C1 0 ], [ R1*R2*C1*C2 R1*C1+R2*C2+R2*C1 1 ] );
% Graphs
subplot( 1, 2, 1 );
[x,t] = step( tra );
plot( t, x );
title( 'Response of System 4 to a Step Input' );
xlabel( 'Time (s)' );
ylabel( 'Output (V)' );
legend( 'Simulated Response', 'Theoretical Response' );
subplot( 1, 2, 2 );
bode( tra );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment