How would I solve for following, else any implemented algorithms or solvers in matlab (even ways to solve it) for Lyapunov differential equation of form:
$$P'(t) + A(t)^TP(t) + P(t)A(t) + Q(t) = 0,$$
where $Q(t)> 0$, with $P(t)$ being symmetric periodic positive definite, $A(t)$ is linearized dynamics of the system.
Suppose that $A$ is constant. Let us take $$P(t)=\exp(-tA^T)R(t)\exp(-tA),$$ where $R(t)$ is some matrix. We can write the derivative of $P$: $$P'(t)=-A^TP(t)-P(t)A+\exp(-tA^T)R'(t)\exp(-tA) = -A^TP(t)-P(t)A-Q(t).$$ Now we have $$R'(t) = - \exp(tA^T)Q(t)\exp(tA),$$ which is easy to solve.
This method can be generalized to $A=A(t)$, but it will require strong hypothesis on $A(t)$: we will need that $A(t_1)A(t_2)=A(t_2)A(t_1)$ for all $t_1$ and $t_2$.