|
633 | 633 | model::SimModel, C, c_x̂min, c_x̂max, x̂min, x̂max, ex̄ |
634 | 634 | ) -> A_x̃min, A_x̃max, x̃min, x̃max, ẽx̄ |
635 | 635 |
|
636 | | -TBW |
| 636 | +Augment arrival state constraints with slack variable ϵ for softening the MHE. |
| 637 | +
|
| 638 | +Denoting the MHE decision variable augmented with the slack variable ``\mathbf{Z̃} = |
| 639 | +[\begin{smallmatrix} ϵ \\ \mathbf{Z} \end{smallmatrix}]``, it returns the ``\mathbf{ẽ_x̄}`` |
| 640 | +matrix that appears in the estimation error at arrival equation ``\mathbf{x̄} = |
| 641 | +\mathbf{ẽ_x̄ Z̃ + f_x̄}``. It also returns the augmented constraints ``\mathbf{x̃_{min}}`` and |
| 642 | +``\mathbf{x̃_{max}}``, and the ``\mathbf{A}`` matrices for the inequality constraints: |
| 643 | +```math |
| 644 | +\begin{bmatrix} |
| 645 | + \mathbf{A_{x̃_{min}}} \\ |
| 646 | + \mathbf{A_{x̃_{max}}} |
| 647 | +\end{bmatrix} \mathbf{Z̃} ≤ |
| 648 | +\begin{bmatrix} |
| 649 | + - \mathbf{x̃_{min} + f_x̄} \\ |
| 650 | + + \mathbf{x̃_{max} - f_x̄} |
| 651 | +\end{bmatrix} |
| 652 | +``` |
637 | 653 | """ |
638 | 654 | function relaxarrival(::SimModel{NT}, C, c_x̂min, c_x̂max, x̂min, x̂max, ex̄) where {NT<:Real} |
639 | 655 | ex̂ = -ex̄ |
|
655 | 671 | @doc raw""" |
656 | 672 | relaxX̂(model::SimModel, C, C_x̂min, C_x̂max, Ex̂) -> A_X̂min, A_X̂max, Ẽx̂ |
657 | 673 |
|
658 | | -TBW |
| 674 | +Augment estimated state constraints with slack variable ϵ for softening the MHE. |
| 675 | +
|
| 676 | +Denoting the MHE decision variable augmented with the slack variable ``\mathbf{Z̃} = |
| 677 | +[\begin{smallmatrix} ϵ \\ \mathbf{Z} \end{smallmatrix}]``, it returns the ``\mathbf{Ẽ_x̂}`` |
| 678 | +matrix that appears in estimated states equation ``\mathbf{X̂} = \mathbf{Ẽ_x̂ Z̃ + F_x̂}``. It |
| 679 | +also returns the ``\mathbf{A}`` matrices for the inequality constraints: |
| 680 | +```math |
| 681 | +\begin{bmatrix} |
| 682 | + \mathbf{A_{X̂_{min}}} \\ |
| 683 | + \mathbf{A_{X̂_{max}}} |
| 684 | +\end{bmatrix} \mathbf{Z̃} ≤ |
| 685 | +\begin{bmatrix} |
| 686 | + - \mathbf{X̂_{min} + F_x̂} \\ |
| 687 | + + \mathbf{X̂_{max} - F_x̂} |
| 688 | +\end{bmatrix} |
| 689 | +``` |
659 | 690 | """ |
660 | 691 | function relaxX̂(::LinModel{NT}, C, C_x̂min, C_x̂max, Ex̂) where {NT<:Real} |
661 | 692 | if !isinf(C) # Z̃ = [ϵ; Z] |
|
680 | 711 | @doc raw""" |
681 | 712 | relaxŴ(model::SimModel, C, C_ŵmin, C_ŵmax, nx̂) -> A_Ŵmin, A_Ŵmax |
682 | 713 |
|
683 | | -TBW |
| 714 | +Augment estimated process noise constraints with slack variable ϵ for softening the MHE. |
| 715 | +
|
| 716 | +Denoting the MHE decision variable augmented with the slack variable ``\mathbf{Z̃} = |
| 717 | +[\begin{smallmatrix} ϵ \\ \mathbf{Z} \end{smallmatrix}]``, it returns the ``\mathbf{A}`` |
| 718 | +matrices for the inequality constraints: |
| 719 | +```math |
| 720 | +\begin{bmatrix} |
| 721 | + \mathbf{A_{Ŵ_{min}}} \\ |
| 722 | + \mathbf{A_{Ŵ_{max}}} |
| 723 | +\end{bmatrix} \mathbf{Z̃} ≤ |
| 724 | +\begin{bmatrix} |
| 725 | + - \mathbf{Ŵ_{min}} \\ |
| 726 | + + \mathbf{Ŵ_{max}} |
| 727 | +\end{bmatrix} |
| 728 | +``` |
684 | 729 | """ |
685 | 730 | function relaxŴ(::SimModel{NT}, C, C_ŵmin, C_ŵmax, nx̂) where {NT<:Real} |
686 | 731 | A = [zeros(NT, length(C_ŵmin), nx̂) I] |
|
695 | 740 | @doc raw""" |
696 | 741 | relaxV̂(model::SimModel, C, C_v̂min, C_v̂max, E) -> A_V̂min, A_V̂max, Ẽ |
697 | 742 |
|
698 | | -TBW |
| 743 | +Augment estimated sensor noise constraints with slack variable ϵ for softening the MHE. |
| 744 | +
|
| 745 | +Denoting the MHE decision variable augmented with the slack variable ``\mathbf{Z̃} = |
| 746 | +[\begin{smallmatrix} ϵ \\ \mathbf{Z} \end{smallmatrix}]``, it returns the ``\mathbf{Ẽ}`` |
| 747 | +matrix that appears in estimated sensor noise equation ``\mathbf{V̂} = \mathbf{Ẽ Z̃ + F}``. It |
| 748 | +also returns the ``\mathbf{A}`` matrices for the inequality constraints: |
| 749 | +```math |
| 750 | +\begin{bmatrix} |
| 751 | + \mathbf{A_{V̂_{min}}} \\ |
| 752 | + \mathbf{A_{V̂_{max}}} |
| 753 | +\end{bmatrix} \mathbf{Z̃} ≤ |
| 754 | +\begin{bmatrix} |
| 755 | + - \mathbf{V̂_{min} + F} \\ |
| 756 | + + \mathbf{V̂_{max} - F} |
| 757 | +\end{bmatrix} |
| 758 | +``` |
699 | 759 | """ |
700 | 760 | function relaxV̂(::LinModel{NT}, C, C_v̂min, C_v̂max, E) where {NT<:Real} |
701 | 761 | if !isinf(C) # Z̃ = [ϵ; Z] |
|
0 commit comments