pub struct SmaController {
pub sma: ShapeMemoryAlloy,
pub target_xi: f64,
pub t_hot: f64,
pub t_cold: f64,
pub kp: f64,
pub temperature: f64,
pub max_power: f64,
}Expand description
Bang-bang + proportional controller for SMA wire actuator temperature.
Fields§
§sma: ShapeMemoryAlloyReference SMA model.
target_xi: f64Target martensite fraction.
t_hot: f64Temperature setpoint for full austenite [K].
t_cold: f64Temperature setpoint for full martensite [K].
kp: f64Proportional gain for temperature error.
temperature: f64Current temperature [K].
max_power: f64Maximum heating power [W].
Implementations§
Source§impl SmaController
impl SmaController
Sourcepub fn new(
sma: ShapeMemoryAlloy,
t_hot: f64,
t_cold: f64,
kp: f64,
max_power: f64,
) -> Self
pub fn new( sma: ShapeMemoryAlloy, t_hot: f64, t_cold: f64, kp: f64, max_power: f64, ) -> Self
Create an SMA controller.
Sourcepub fn set_target(&mut self, xi_target: f64)
pub fn set_target(&mut self, xi_target: f64)
Set target martensite fraction.
Sourcepub fn compute_power(&self) -> f64
pub fn compute_power(&self) -> f64
Compute heating power to achieve target (bang-bang + proportional).
Trait Implementations§
Source§impl Clone for SmaController
impl Clone for SmaController
Source§fn clone(&self) -> SmaController
fn clone(&self) -> SmaController
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SmaController
impl RefUnwindSafe for SmaController
impl Send for SmaController
impl Sync for SmaController
impl Unpin for SmaController
impl UnsafeUnpin for SmaController
impl UnwindSafe for SmaController
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more