  Suppose $G$ is a higher-rank connected semisimple Lie group with finite
center and without compact factors. Let $\mathbb{G}=G$ or $\mathbb{G}=G\ltimes
V$, where $V$ is a finite dimensional vector space $V$. For any unitary
representation $(\pi,\mathcal{H})$ of $\GG$, we study the twisted cohomological
equation $\pi(a)f-\lambda f=g$ for partially hyperbolic element $a\in
\mathbb{G}$ and $\lambda\in U(1)$, as well as the twisted cocycle equation
$\pi(a_1)f-\lambda_1f=\pi(a_2)g-\lambda_2 g$ for commuting partially hyperbolic
elements $a_1,\,a_2\in \mathbb{G}$. We characterize the obstructions to solving
these equations, construct smooth solutions and obtain tame Sobolev estimates
for the solutions. These results can be extended to partially hyperbolic flows
parallelly.
  As an application, we prove cocycle rigidity for any abelian higher-rank
partially hyperbolic algebraic actions. This is the first paper exploring
rigidity properties of partially hyperbolic that the hyperbolic directions
don't generate the whole tangent space. The result can be viewed as a first
step toward the application of KAM method in obtaining differential rigidity
for these actions in future works.
