PID - MapleSim Help

PID Description

The PID component models an ideal proportional-integral-derivative (PID) controller. This controller differs from the ones normally used in the industrial setup as the proportional gain, k, is decoupled from the system. This does not affect the integral and the derivative gain performance. For a more practically useful PID-controller, use the Lim PID component.

The equation of this controller is $y=k\left(1+\frac{1}{{T}_{i}s}+{T}_{d}s\right)u$ where the derivative is estimated numerically based on the time step, ${N}_{d}$. The greater the value of ${N}_{d}$, the better the estimate of the derivative.

The Signal Size parameter allows the block to operate on a vector of signals rather than a single signal. Initialization

The PID block can be initialized in different ways controlled by parameter initType. DoNotUse_InitialIntegratorState is added for backward compatibility reasons.

 initType Integrator initType Derivative initType NoInit NoInit NoInit SteadyState SteadyState SteadyState InitialState InitialState InitialState InitialOutput and initial equation: y = y_start NoInit SteadyState DoNotUse_InitialIntegratorState InitialState NoInit

In many cases, the most useful initial condition is SteadyState because initial transients are no longer present. If $\mathrm{initType}=\mathrm{InitPID}\cdot \mathrm{SteadyState}$, then in some cases difficulties might occur. The reason is the equation of the integrator, $\stackrel{.}{y}=ku$. The steady state equation, $\stackrel{.}{x}=0$ leads to the condition that the input to the integrator is 0. If the input $u$ is already (directly or indirectly) defined by another initial condition, the initialization problem is singular (that is, has none or infinitely many solutions). This situation occurs often in mechanical systems, where, for example, $u=\mathrm{desiredSpeed}-\mathrm{measuredSpeed}$. Because speed is both a state and a derivative, it is natural to initialize it with 0. As sketched, this is not possible. The solution is to not initialize ${u}_{m}$ or the variable that is used to compute ${u}_{m}$ by an algebraic equation. If the parameter Limits At Initial is $\mathrm{false}$, the limits at the output of this component are removed from the initialization problem, which leads to a much simpler equation system. After initialization has been performed, it is checked with an assert whether the output is in the defined limits. Connections

 Name Description Modelica ID $u$ Real input vector u $y$ Real output vector y Parameters

 Name Default Units Description Modelica ID Signal Size $1$ Dimension of input and output signals signalSize k $1$ Gain k ${T}_{i}$ $0.5$ $s$ Time Constant of Integrator Ti ${T}_{d}$ $0.1$ $s$ Time Constant of Derivative block Td ${N}_{d}$ $10$ The greater ${N}_{d}$, the more ideal the derivative component Nd Initial Values NoInit Type of initialization; see Initialization section initType ${x}_{{i}_{0}}$ $0$ Initial or guess value for the output of the integrator component xi_start ${x}_{{d}_{0}}$ $0$ Initial or guess value for state of derivative component xd_start ${y}_{0}$ $0$ Initial value of output y_start
{"ft_lang_label":"__label__en","ft_lang_prob":0.8333654,"math_prob":0.9964691,"size":2820,"snap":"2023-40-2023-50","text_gpt3_token_len":634,"char_repetition_ratio":0.13884944,"word_repetition_ratio":0.0046948357,"special_character_ratio":0.18333334,"punctuation_ratio":0.092929296,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9987271,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,null,null,1,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-25T02:33:55Z\",\"WARC-Record-ID\":\"<urn:uuid:619ba6d9-8f45-4416-acad-cce80b3032b4>\",\"Content-Length\":\"152256\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:68e0368f-3cac-4e94-89dd-50122985416c>\",\"WARC-Concurrent-To\":\"<urn:uuid:9d28bcea-42c8-4eaf-b0b9-c42952123403>\",\"WARC-IP-Address\":\"199.71.183.28\",\"WARC-Target-URI\":\"https://jp.maplesoft.com/support/help/maple/view.aspx?path=componentLibrary%2FsignalBlocks%2Fcontrollers%2FPID\",\"WARC-Payload-Digest\":\"sha1:4OZHPOKZQQ3443KI2Z6IIZS5N3GQRZSD\",\"WARC-Block-Digest\":\"sha1:S2Y33NQSBXXPXC6AHPG47PMJR436FAQ3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506676.95_warc_CC-MAIN-20230925015430-20230925045430-00156.warc.gz\"}"}