RLC Circuit Analyzer App
The RLC Analyzer app is an example of how you can add linear analysis response plots to your own custom apps. The app displays response plots for various RLC circuit topologies and allows the user to interactively adjust values for the resistance, inductor, and capacitor components.
For an example of how to create such apps, see Create App with Linear Analysis Response Plots.
To run the app, type the following command.
RLCAnalyzer
Circuit Configuration
The app includes drop-down lists to select the type of RLC circuit and the system topology. The user can select either parallel or series configurations of the following filter types. When you change the circuit structure using these drop-down menus, the app updates the circuit diagram.
Low-pass filter
High-pass filter
Band-pass filter
Band-stop filter
For any given circuit configuration, the app allows the user to adjust the resistor, inductor, and capacitor component values, R, L, and C, respectively.
When the user modifies the circuit structure or component values, the response plots update automatically.
Response Plots
The app displays the following response plots for the selected RLC circuit. The app initialization code creates the plots using the specified plotting functions. Each plotting function creates a chart object that you can modify using dot notation.
Response Type | Plotting Function |
Bode diagram |
|
Pole-zero map |
|
Step response |
|
Nyquist diagram |
|
When the user modifies the circuit structure, the app computes a new transfer function model and updates the model source data for the response plots. For example, the following code sets the model for the Bode plot to the updated system. Here, bp
is the chart object for the Bode plot and Model
is the updated transfer function, both of which are defined as properties of the app.
app.bp.Responses(1).SourceData.Model = app.Model;
Once the app modifies the model source data for a chart object, the corresponding response plot updates.
See Also
App
Designer | bodeplot
| nyquistplot
| pzplot
| stepplot