New Signal Proposal : Sawtooth Wave #2043
OwenDavid
started this conversation in
Show and tell
Replies: 1 comment
-
|
Good idea, this has been missing a long time in Hopsan. The implementation seems correct, but I am concerned about the inexact maximum values. The signal sometimes reaches the maximum value a little too early, and then remains constant a short while before falling. I am not sure if it is due to the use of floating-point numbers for counter variables, comparing floating-point numbers or just an integration error. A more accurate solution would be to use a modulo operator with some additional computations. Here is my attempt: What do you think? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The sawtooth wave is a typical signal source and can be found as standard in other modelling software, such as Amesim and Simster from BoschRexroth.
The attached code is a proposal for a new signal component which outputs a sawtooth wave train. The component is based on the pulse wave from the default library.
I trust this will be a useful addition and worthy of consideration
SignalSawtoothWave.zip
Beta Was this translation helpful? Give feedback.
All reactions