Skip to content

Decouples Signal sources from their smooth wave shapes #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

ven-k
Copy link
Member

@ven-k ven-k commented Nov 18, 2021

  • Adds wave_functions to Blocks. The *Function components give out y output of * shape
  • Tests the wave-functions
  • Removes all shaped voltage sources in favour of VoltageSource

TODO:

  • Add tests for CurrentSource + Functions

- Adds `wave_functions` to Blocks. The `*Function` components give out `y` output of `*` shape
- Tests the wave-functions
- Removes all shaped voltage sources in favour of `VoltageSource`
ven-k and others added 2 commits November 18, 2021 21:21
Co-authored-by: Fredrik Bagge Carlson <[email protected]>
@ChrisRackauckas
Copy link
Member

I'm not sure this applies after #7.

@ven-k
Copy link
Member Author

ven-k commented Apr 24, 2022

#7 added docstrings and updated connector.

This PR serves a different purpose.
This PR moves smooth functions to Blocks and then exports only one VoltageSource and a CurrentSource. Mix and match of smooth wave generators in Blocks and these sources will give out the signals of required shapes.
This reduces n_shapes*n_dimensions to n_shapes+ n_dimensions.

For example
(provided by @baggepinnen)
image
where a sin source is connected to a torque converter. The torque converter could easily be replaced for a voltage/flow/current converter for a different application

Current status:

If necessary I can set all starttime to 0; and rebase to main . The unit tests will pass. And whenever the issue is fixed upstream, I'll fix this.

@ValentinKaisermayer
Copy link
Contributor

I'm not sure this applies after #7.

I guess you meant #26

@ValentinKaisermayer
Copy link
Contributor

A similar example to the one above is already present in main.

@testset "two inertias with driving torque" begin

What would be needed are corresponding smooth source functions in Blocks, see #30.

@ven-k
Copy link
Member Author

ven-k commented Apr 24, 2022

What would be needed are corresponding smooth source

Perfect. This adds smooth functions.

@ven-k ven-k mentioned this pull request May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants