integrate-reset

Navigation:  Library > Signal > Block Diagram >

integrate-reset

Previous pageReturn to chapter overviewNext page

Library

Signal\Block Diagram

Use

Domains: Continuous. Size: 1-D. Kind: Block Diagrams.

Description-Default

This model integrates an input signal. The output of this integral may be reset to any desired value each time the reset signal is unequal to zero.

 

output = int(inp) + state(0); (reset = 0)

output = reset to newoutput; (reset <> 0)

 

This implementation uses a normal integrator. That is why the model will also work when c-code is generated.

Interface-Default

Inputs

Description

input

reset

 

newoutput

Input signal

When reset <> 0, the output changes to newoutput.

New output.

Outputs

 

output

 

Initial Values

 

state(0)

The initial value of the integral.

Description-Pure

This model integrates an input signal. The output of this integral may be reset to any desired value each time the reset signal is unequal to zero.

 

output = int(inp) + state(0); (reset = 0)

output = reset to newoutput; (reset <> 0)

 

This implementation uses the function resint. This function forces the integration method with a state event to search for the exact time where the integral is reset. The result is more accurate than the Default implementation, but this implementation will not work when c-code is generated.

Interface-Pure

Inputs

Description

input

reset

 

newoutput

Input signal

When reset <> 0, the output changes to newoutput.

New output.

Outputs

 

output

 

Initial Values

 

state(0)

The initial value of the integral.