Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Using input_output_response(...), Simple System Gives Erroneous Output #890

Closed
Assignees
murrayrm
@frohro

Description

@frohro

This system should not have the bump in the output you see about halfway through the simulation.

import matplotlib.pyplot as pltimport numpy as npimport control as ctrlR = 22e3C = 470e-6circuit = ctrl.ss(-1/(R*C), 1/(R*C), 1, 0)t, resp = ctrl.step_response(circuit)plt.plot(t, resp)plt.title('Step Response of the RC Circuit')plt.grid()print("The eigenvalue is: ",-1/(R*C))print("numpy gives the eigenvalue, and eigen vector respectively as: ")np.linalg.eig(circuit.A)t = np.arange(0, 120, 0.01)u = 3.3*148/256-3.3*40/256*np.heaviside(t-60,1)plt.plot(t,u)x0 = 3.3*128/256t, vc = ctrl.input_output_response(circuit, t, u, x0)plt.plot(t,vc)plt.grid()plt.title("Response of RC Circuit")plt.legend(["u","$v_c$"])plt.xlabel("time (seconds)")plt.ylabel("Voltage (Volts)")plt.show()

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp