SAN FRANCISCO, June 25 (Reuters) - German automaker Volkswagen Group will invest up to $5 billion in U.S. electric-vehicle maker Rivian as part of a new, equally controlled joint venture to share EV architecture and software, the companies said on Tuesday.

The partnership will help Volkswagen accelerate its plans to develop software-defined vehicles (SDV), with Rivian licensing its existing intellectual property rights to the joint venture.

While EV startups have been grappling with a slowdown in demand amid high interest rates and dwindling cash, traditional automakers have struggled to build battery-powered vehicles and advanced software.

(Reporting by Abhirup Roy in San Francisco; Editing by Rod Nickel)