Commit 380d580
Yujie Xu
use newly derived r to compute compressor speed and Q_evap_req
how r is derived:
in the original code
Q_evap_req = Q_cond_req - CompEvaporatingPWRSpd(CounterCompSpdTemp);
I think the intent was
Q_cond_req = Q_req = Q_evap_req + compressor heat
but compressor heat might not actually be CompEvaporatingPWRSpd(CounterCompSpdTemp)
let
k be the speed level
C be the short form for C_cap_operation
PWR(.) be the short form of CompEvaporatingPWRSpd(.)
CAP(.) be the short form of CompEvaporatingCAPSpd(.)
spd(.) be the short form of this->CompressorSpeed(.)
deltaPWR be PWR(k) - PWR(k - 1)
deltaCAP be CAP(k) - CAP(k - 1)
I think compressor heat should be this instead of just PWR(k)
compressor heat = deltaPWR * r + PWR(k - 1)
so
Q_cond_req = Q_req = Q_evap_req + deltaPWR * r + PWR(k - 1) <---- eq 1
we also know this from the CompSpdActual calculation equation that
CompSpdActual = Spd(k - 1) + deltaSpd / deltaCAP * (Q_evap_req * C - CAP(k - 1))
so we call the following r
r = (Q_evap_req * C - CAP(k - 1)) / deltaCAP
so
CompSpdActual = Spd(k - 1) + deltaSpd * r
arranging terms in eq 1
Q_cond_req - deltaPWR * r - PWR(k - 1) = Q_evap_req
(Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1) = Q_evap_req * C - CAP(k - 1)
((Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1)) / deltaCAP = (Q_evap_req * C - CAP(k - 1)) / deltaCAP
((Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1)) / deltaCAP = r
(Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1) = deltaCAP * r
(Q_cond_req - PWR(k - 1)) * C - CAP(k - 1) = deltaCAP * r + deltaPWR * r * C
so
r = ((Q_cond_req - PWR(k - 1)) * C - CAP(k - 1)) / (deltaCAP + deltaPWR * C)
= ((Q_cond_req - PWR(k - 1)) - CAP(k - 1)/C) / (deltaCAP/C + deltaPWR)
in the special case where k = 1, then k - 1, PWR(k - 1) and CAP(k - 1) will all be 0
r = ((Q_cond_req) * C) / (CAP(1) + PWR(1) * C)
= (Q_cond_req) / (CAP(1)/C + PWR(1))1 parent a777bf5 commit 380d580
1 file changed
Lines changed: 23 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13703 | 13703 | | |
13704 | 13704 | | |
13705 | 13705 | | |
13706 | | - | |
13707 | | - | |
13708 | | - | |
13709 | | - | |
13710 | | - | |
13711 | | - | |
13712 | | - | |
13713 | | - | |
13714 | | - | |
13715 | | - | |
13716 | | - | |
13717 | | - | |
13718 | | - | |
13719 | | - | |
13720 | | - | |
13721 | | - | |
13722 | | - | |
13723 | | - | |
13724 | | - | |
13725 | | - | |
13726 | | - | |
| 13706 | + | |
| 13707 | + | |
| 13708 | + | |
| 13709 | + | |
| 13710 | + | |
| 13711 | + | |
| 13712 | + | |
| 13713 | + | |
| 13714 | + | |
| 13715 | + | |
| 13716 | + | |
| 13717 | + | |
| 13718 | + | |
| 13719 | + | |
| 13720 | + | |
| 13721 | + | |
| 13722 | + | |
| 13723 | + | |
| 13724 | + | |
| 13725 | + | |
| 13726 | + | |
| 13727 | + | |
| 13728 | + | |
13727 | 13729 | | |
13728 | | - | |
13729 | | - | |
13730 | 13730 | | |
13731 | 13731 | | |
13732 | 13732 | | |
| |||
0 commit comments