Clear Filters
Clear Filters

Setting initial condition on capacitor in Simscape doesn't seem to work.

6 views (last 30 days)
I don't seem to be able to set an initial condition charge on the capacitor in a circuit of resistos and capacitors driven by a current source in turn driven by a square wave that ups the current from zero to a prescribed level at a prescribed time. Setting both the parameters "capacitor voltage" and "voltage" doesn't seem to work (why one has both choices is unclear to me -- voltage across the capacitor at time zero would represent a certain initial charge. I'm attempting to simulate the peripheral vasculature which, at zero current (cardiac output), has a certain starting pressure (voltage) determined by initial distribution of starting volume (charge) amongst the capacitors (elastic elements of vasculature). Despite the setting of capacitor voltage and voltage, capacitor voltage in the simulation starts at zero. UPDATE: I've seen the response from Sebastian Castro about the option that the capacitor be represented as having resistors representing deviation from ideality, so, since I have infinite parallel resistance, there wouldn't be a difference between voltage across the terminals and capacitor voltage -- I presume just specifyin the capacitor voltage will suffice. I tried that though, and still did not get a solution reflecting the initial condition of charge on the capacitor.

Answers (0)

Categories

Find more on Electrical Systems in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!